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 2011/04/16 22:38:49 UTC
svn commit: r1094048 - /couchdb/trunk/share/www/script/futon.browse.js
Author: jan
Date: Sat Apr 16 20:38:49 2011
New Revision: 1094048
URL: http://svn.apache.org/viewvc?rev=1094048&view=rev
Log:
Fix display issue with documents that have single or double quotes
in their id.
Closes COUCHDB-1111
Modified:
couchdb/trunk/share/www/script/futon.browse.js
Modified: couchdb/trunk/share/www/script/futon.browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.browse.js?rev=1094048&r1=1094047&r2=1094048&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Sat Apr 16 20:38:49 2011
@@ -690,10 +690,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: " + $.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: " + $.futon.escape(row.id) + "</span></a></td>")
.appendTo(tr);
} else {
$("<td class='key'><strong></strong></td>")