summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas BrĂ¼derli2010-06-28 13:51:37 +0000
committerThomas BrĂ¼derli2010-06-28 13:51:37 +0000
commitfe4d9d7d1242264365c3cd310510521dc6af5e3a (patch)
tree9787d4c9772ba74dd280a7c9d2016f7086f49186
parent543b6cdbb6d9d1c5b8c6db15349bd2cdb9bec332 (diff)
downloaditools-fe4d9d7d1242264365c3cd310510521dc6af5e3a.tar.gz
itools-fe4d9d7d1242264365c3cd310510521dc6af5e3a.tar.bz2
itools-fe4d9d7d1242264365c3cd310510521dc6af5e3a.zip
Also replace typographic quotes in itjs::encode as done in it_html::latinize in order to prevent later quoting problems
-rw-r--r--itjs.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs.class b/itjs.class
index 0f20aba..b772a28 100644
--- a/itjs.class
+++ b/itjs.class
@@ -91,7 +91,7 @@ function encode($values)
else if (!is_array($value))
{
$quote = (strval(intval($value)) === strval($value)) ? "" : '"';
- $string = strtr($value, array("\0" => '\\0', '"' => '\\"', "</"=>"<\\/", "\n" => '\\n', "\r" => '\\r', "\t" => '\\t', "\\" => '\\\\'));
+ $string = strtr($value, array("\0" => '\\0', "\x93" => '\\"',"\x94" => '\\"', '"' => '\\"', "</"=>"<\\/", "\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;
}