From fe4d9d7d1242264365c3cd310510521dc6af5e3a Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Mon, 28 Jun 2010 13:51:37 +0000 Subject: Also replace typographic quotes in itjs::encode as done in it_html::latinize in order to prevent later quoting problems --- itjs.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'itjs.class') 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; } -- cgit v1.2.3