Skip to content

Commit

Permalink
Fix display issue with documents that have single or double quotes
Browse files Browse the repository at this point in the history
in their id.

Closes COUCHDB-1111

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1094048 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
janl committed Apr 16, 2011
1 parent befdbfa commit 30eba05
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions share/www/script/futon.browse.js
Expand Up @@ -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:&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>")
Expand Down

0 comments on commit 30eba05

Please sign in to comment.