Permalink
Browse files

Escape inner double quotes when cleaning JSON

  • Loading branch information...
1 parent d6bd146 commit 8e8ad2b5430ec19a7427ff2eb54230299dda337a @kolber committed Apr 4, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 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) {

0 comments on commit 8e8ad2b

Please sign in to comment.