From 796f9d6690e3f2ff0dc01ab113529143e137fbe1 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 31 Jan 2013 18:24:31 +0000 Subject: it::serialize must quote ' in keys --- itjs.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'itjs.class') diff --git a/itjs.class b/itjs.class index 79158f6..e8284ce 100644 --- a/itjs.class +++ b/itjs.class @@ -85,7 +85,7 @@ static function encode($values) if ($texts[2]) { if ($jskeyword[$key] || !preg_match('/^[a-z_]\w*$/i', $key)) - $key = "'$key'"; + $key = "'" . addslashes($key) . "'"; $result .= "$key:"; } -- cgit v1.2.3