Skip to content

Commit

Permalink
Avoid double escaping in Futon edit fields. Patch by Martin Haaß. Clo…
Browse files Browse the repository at this point in the history
…ses COUCHDB-611.

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@950696 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
janl committed Jun 2, 2010
1 parent faa27f9 commit 85ceb17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 5 additions & 1 deletion share/www/script/futon.format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>";
Expand Down

0 comments on commit 85ceb17

Please sign in to comment.