summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS1
-rw-r--r--share/www/script/futon.format.js6
2 files changed, 6 insertions, 1 deletions
diff --git a/THANKS b/THANKS
index ad5104b7..9c02e64d 100644
--- a/THANKS
+++ b/THANKS
@@ -56,5 +56,6 @@ suggesting improvements or submitting changes. Some of these people are:
* Jae Kwon <jkwon.work@gmail.com>
* Gavin Sherry <swm@alcove.com.au>
* Timothy Smith <tim@couch.io>
+ * Martin Haaß <MartinHaass@gmx.net>
For a list of authors see the `AUTHORS` file.
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 = "<code class='" + type + "'>" + retval + "</code>";