mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
autocomplete: back to custom json encoding (for compat with older PHP implementations, fixed the double quotes
This commit is contained in:
parent
961238a50b
commit
de8ed36df1
@ -588,13 +588,13 @@ function array_to_json( $array ){
|
|||||||
if( is_numeric($key) ){
|
if( is_numeric($key) ){
|
||||||
$key = "key_$key";
|
$key = "key_$key";
|
||||||
}
|
}
|
||||||
$key = "'".addslashes($key)."'";
|
$key = "\"".addslashes($key)."\"";
|
||||||
|
|
||||||
// Format the value:
|
// Format the value:
|
||||||
if( is_array( $value )){
|
if( is_array( $value )){
|
||||||
$value = array_to_json( $value );
|
$value = array_to_json( $value );
|
||||||
} else if( !is_numeric( $value ) || is_string( $value ) ){
|
} else if( !is_numeric( $value ) || is_string( $value ) ){
|
||||||
$value = "'".addslashes($value)."'";
|
$value = "\"".addslashes($value)."\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add to staging array:
|
// Add to staging array:
|
||||||
|
Loading…
Reference in New Issue
Block a user