summaryrefslogtreecommitdiff
path: root/couchjs/js/json2.js
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2011-06-13 14:59:55 +0100
committerRobert Newson <robert.newson@cloudant.com>2011-06-13 14:59:55 +0100
commite9a5a6f90a021db1db8a7e55ec797a4c86edcad6 (patch)
tree06d0c28969cfcf54b2f137e7407b097f73aa0f21 /couchjs/js/json2.js
parent266ba88ac6ded40087e0211ad9e75e4ce64e66cb (diff)
parent3c1a0d7e2c9adef4f8b20c9df205a86e5c0feefb (diff)
Merge CouchDB 1.1
Diffstat (limited to 'couchjs/js/json2.js')
-rw-r--r--couchjs/js/json2.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/couchjs/js/json2.js b/couchjs/js/json2.js
index 39d8f370..a1a3b170 100644
--- a/couchjs/js/json2.js
+++ b/couchjs/js/json2.js
@@ -1,6 +1,6 @@
/*
http://www.JSON.org/json2.js
- 2009-09-29
+ 2010-03-20
Public Domain.
@@ -433,6 +433,7 @@ if (!this.JSON) {
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
+ text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {