Skip to content

Commit

Permalink
Unescape slashes when encoding JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Jan 6, 2022
1 parent ba6f669 commit 3965f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/DataStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function toArray() {
* @return string|false JSON string on success, false on failure.
*/
public function toJson() {
return json_encode( (object) $this->data, JSON_PRETTY_PRINT );
return json_encode( (object) $this->data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
}

}

0 comments on commit 3965f64

Please sign in to comment.