From 85ceb17d00984b902cadc7a344f9d4adb82d50a5 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Wed, 2 Jun 2010 18:09:43 +0000 Subject: =?UTF-8?q?Avoid=20double=20escaping=20in=20Futon=20edit=20fields.?= =?UTF-8?q?=20Patch=20by=20Martin=20Haa=C3=9F.=20Closes=20COUCHDB-611.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@950696 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/futon.format.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/www/script/futon.format.js b/share/www/script/futon.format.js index 5feee817..e2eb0593 100644 --- a/share/www/script/futon.format.js +++ b/share/www/script/futon.format.js @@ -44,7 +44,11 @@ if (type == "string" && !options.escapeStrings) { retval = indentLines(retval.replace(/\r\n/g, "\n"), tab.substr(options.indent)); } else { - retval = escape(JSON.stringify(val)); + if (options.html) { + retval = escape(JSON.stringify(val)); + } else { + retval = JSON.stringify(val); + } } if (options.html) { retval = "" + retval + ""; -- cgit v1.2.3