Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Escape inner double quotes when cleaning JSON

  • Loading branch information...
commit 8e8ad2b5430ec19a7427ff2eb54230299dda337a 1 parent d6bd146
Anthony Kolber authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/page-data.inc.php
4 app/page-data.inc.php
View
@@ -248,8 +248,8 @@ static function html_to_xhtml(&$value) {
}
static function clean_json($value) {
- # escape inner quotes
- return addslashes($value);
+ # escape inner double quotes
+ return preg_replace('/\"/', '\"', $value);
}
static function create($page, $content = false) {
Please sign in to comment.
Something went wrong with that request. Please try again.