You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2010/06/02 20:09:43 UTC
svn commit: r950696 - in /couchdb/trunk: THANKS
share/www/script/futon.format.js
Author: jan
Date: Wed Jun 2 18:09:43 2010
New Revision: 950696
URL: http://svn.apache.org/viewvc?rev=950696&view=rev
Log:
Avoid double escaping in Futon edit fields. Patch by Martin Haaß. Closes COUCHDB-611.
Modified:
couchdb/trunk/THANKS
couchdb/trunk/share/www/script/futon.format.js
Modified: couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/couchdb/trunk/THANKS?rev=950696&r1=950695&r2=950696&view=diff
==============================================================================
--- couchdb/trunk/THANKS (original)
+++ couchdb/trunk/THANKS Wed Jun 2 18:09:43 2010
@@ -56,5 +56,6 @@ suggesting improvements or submitting ch
* Jae Kwon <jk...@gmail.com>
* Gavin Sherry <sw...@alcove.com.au>
* Timothy Smith <ti...@couch.io>
+ * Martin Haaà <Ma...@gmx.net>
For a list of authors see the `AUTHORS` file.
Modified: couchdb/trunk/share/www/script/futon.format.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.format.js?rev=950696&r1=950695&r2=950696&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.format.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.format.js [utf-8] Wed Jun 2 18:09:43 2010
@@ -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>";