diff options
author | alecpl <alec@alec.pl> | 2009-12-09 08:18:47 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-12-09 08:18:47 +0000 |
commit | e5d60d69d4108a0e62270548117773244ca1905e (patch) | |
tree | c70df9ed50f8c97252b8233fdfdeec1646f56640 /program/include/rcube_template.php | |
parent | 46b48d9afc9ef9a7669fd0089005b79486b85dda (diff) |
- Use built-in json_encode() for proper JSON format in AJAX replies (and compat. with jQuery 1.4)
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-x | program/include/rcube_template.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index 5226f8db8..19f2d430b 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -414,12 +414,12 @@ class rcube_template extends rcube_html_page { $out = ''; if (!$this->framed && !empty($this->js_env)) { - $out .= JS_OBJECT_NAME . '.set_env('.json_serialize($this->js_env).");\n"; + $out .= JS_OBJECT_NAME . '.set_env('.json_encode($this->js_env).");\n"; } foreach ($this->js_commands as $i => $args) { $method = array_shift($args); foreach ($args as $i => $arg) { - $args[$i] = json_serialize($arg); + $args[$i] = json_encode($arg); } $parent = $this->framed || preg_match('/^parent\./', $method); $out .= sprintf( |