diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | share/www/script/futon.format.js | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -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>"; |