diff options
author | Christian Schneider | 2008-11-07 15:33:07 +0000 |
---|---|---|
committer | Christian Schneider | 2008-11-07 15:33:07 +0000 |
commit | 2ef85ec182278544ed7a625a319b8b0ee4edbc74 (patch) | |
tree | 6b21c3b4e843c409fb08ba74f29080092c5cd060 /itjs.class | |
parent | f2ba0bb34e65be3097b957a144643feeb44f3931 (diff) | |
download | itools-2ef85ec182278544ed7a625a319b8b0ee4edbc74.tar.gz itools-2ef85ec182278544ed7a625a319b8b0ee4edbc74.tar.bz2 itools-2ef85ec182278544ed7a625a319b8b0ee4edbc74.zip |
First version of it_html based on objectsdevel-it_html
Diffstat (limited to 'itjs.class')
-rw-r--r-- | itjs.class | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -89,7 +89,8 @@ function encode($values) $result .= 'false'; else if (!is_array($value)) { - $quote = (strval(intval($value)) === strval($value)) ? "" : '"'; + $value = strval($value); + $quote = (strval(intval($value)) === $value) ? "" : '"'; $string = strtr($value, array("\0" => '\\0', '"' => '\\"', "</"=>"<\\/", "\n" => '\\n', "\r" => '\\r', "\t" => '\\t', "\\" => '\\\\')); $string = $GLOBALS['itjs_defaultconfig']['latin2unicode'] ? preg_replace('/([\xa0-\xff])/e', 'sprintf("\\u%04x", ord("\\1"))', $string) : $string; $result .= $quote . $string . $quote; |