couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r950699 - in /couchdb/branches/0.11.x: THANKS share/www/script/futon.format.js
Date Wed, 02 Jun 2010 18:10:44 GMT
Author: jan
Date: Wed Jun  2 18:10:43 2010
New Revision: 950699

URL: http://svn.apache.org/viewvc?rev=950699&view=rev
Log:
Avoid double escaping in Futon edit fields. Patch by Martin Haaß. Closes COUCHDB-611.

Modified:
    couchdb/branches/0.11.x/THANKS
    couchdb/branches/0.11.x/share/www/script/futon.format.js

Modified: couchdb/branches/0.11.x/THANKS
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/THANKS?rev=950699&r1=950698&r2=950699&view=diff
==============================================================================
--- couchdb/branches/0.11.x/THANKS (original)
+++ couchdb/branches/0.11.x/THANKS Wed Jun  2 18:10:43 2010
@@ -53,5 +53,6 @@ suggesting improvements or submitting ch
  * Randall Leeds <randall.leeds@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.

Modified: couchdb/branches/0.11.x/share/www/script/futon.format.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/futon.format.js?rev=950699&r1=950698&r2=950699&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/futon.format.js [utf-8] (original)
+++ couchdb/branches/0.11.x/share/www/script/futon.format.js [utf-8] Wed Jun  2 18:10: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>";



Mime
View raw message