couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1094050 - /couchdb/branches/1.1.x/share/www/script/futon.browse.js
Date Sat, 16 Apr 2011 20:41:19 GMT
Author: jan
Date: Sat Apr 16 20:41:19 2011
New Revision: 1094050

URL: http://svn.apache.org/viewvc?rev=1094050&view=rev
Log:
Fix display issue with documents that have single or double quotes
in their id.

Closes COUCHDB-1111

Modified:
    couchdb/branches/1.1.x/share/www/script/futon.browse.js

Modified: couchdb/branches/1.1.x/share/www/script/futon.browse.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/share/www/script/futon.browse.js?rev=1094050&r1=1094049&r2=1094050&view=diff
==============================================================================
--- couchdb/branches/1.1.x/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/branches/1.1.x/share/www/script/futon.browse.js [utf-8] Sat Apr 16 20:41:19 2011
@@ -682,10 +682,12 @@
               key = $.futon.formatJSON(row.key, {indent: 0, linesep: ""});
             }
             if (row.id) {
-              $("<td class='key'><a href='document.html?" + encodeURIComponent(db.name)
+
-                "/" + $.couch.encodeDocId(row.id) + "'><strong></strong><br>"
+
-                "<span class='docid'>ID:&nbsp;" + $.futon.escape(row.id) + "</span></a></td>")
-                .find("strong").text(key).end()
+              key = key.replace(/\\"/, '"');
+              var rowlink = encodeURIComponent(db.name) +
+                "/" + $.couch.encodeDocId(row.id);
+              $("<td class='key'><a href=\"document.html?" + rowlink + "\"><strong>"
+                 + $.futon.escape(key) + "</strong><br>"
+                 + "<span class='docid'>ID:&nbsp;" + $.futon.escape(row.id) + "</span></a></td>")
                 .appendTo(tr);
             } else {
               $("<td class='key'><strong></strong></td>")



Mime
View raw message