]> source.dussan.org Git - jquery-ui.git/commitdiff
autocomplete: back to custom json encoding (for compat with older PHP implementations...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 28 Jan 2010 13:27:32 +0000 (13:27 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 28 Jan 2010 13:27:32 +0000 (13:27 +0000)
demos/autocomplete/search.php

index af490522e112d35269a8ef307771690ffbd6fac5..4644caf5cbc9e061104334005cc8f37b5166ab41 100644 (file)
@@ -588,13 +588,13 @@ function array_to_json( $array ){
             if( is_numeric($key) ){
                 $key = "key_$key";
             }
-            $key = "'".addslashes($key)."'";
+            $key = "\"".addslashes($key)."\"";
 
             // Format the value:
             if( is_array( $value )){
                 $value = array_to_json( $value );
             } else if( !is_numeric( $value ) || is_string( $value ) ){
-                $value = "'".addslashes($value)."'";
+                $value = "\"".addslashes($value)."\"";
             }
 
             // Add to staging array: