summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/javascript/search-data.php4
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index ee709d30..d00afa1f 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.6-Alpha2
+ - Fixed JSON escaping issue that broke search in some cases
+ (reported by XeeNiX)
- Added admin_enable_required option to user registration
- Fixed session issue preventing some users from streaming
(reported by miir01)
diff --git a/lib/javascript/search-data.php b/lib/javascript/search-data.php
index 11ef68d9..18432454 100644
--- a/lib/javascript/search-data.php
+++ b/lib/javascript/search-data.php
@@ -29,7 +29,9 @@ function arrayToJSON($array) {
$json .= arrayToJSON($value);
}
else {
- $json .= '"' . $value . '"';
+ // Make sure to strip backslashes and convert things to
+ // entities in our output
+ $json .= '"' . scrub_out(str_replace('\\', '', $value)) . '"';
}
$json .= ' , ';
}