diff options
author | Christopher Lenz <cmlenz@apache.org> | 2008-04-11 21:19:59 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2008-04-11 21:19:59 +0000 |
commit | 2ffd808fd701b96d0e3433386b4822bcf923e360 (patch) | |
tree | bb524891bb82d4e00f364fe26f89cf39ab127df3 /share/www | |
parent | d7e0687f4ecd82af8f2cf25d6a0ba676ee051e23 (diff) |
Fix for double-encoded document IDs in Futon. Closes COUCHDB-39.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@647314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/browse.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/share/www/script/browse.js b/share/www/script/browse.js index 7fafc252..8ae1e589 100644 --- a/share/www/script/browse.js +++ b/share/www/script/browse.js @@ -58,10 +58,11 @@ function CouchDatabasePage() { var urlParts = location.search.substr(1).split("/"); var dbName = urlParts.shift(); var viewName = (urlParts.length > 0) ? urlParts.join("/") : null; - if (!viewName) { - viewName = $.cookies.get(dbName + ".view") || ""; - } else { + if (viewName) { + viewName = decodeURIComponent(viewName); $.cookies.set(dbName + ".view", viewName); + } else { + viewName = $.cookies.get(dbName + ".view") || ""; } var db = new CouchDB(dbName); @@ -376,7 +377,7 @@ function CouchDocumentPage() { var urlParts = location.search.substr(1).split("/"); var dbName = urlParts.shift(); var idParts = urlParts.join("/").split("@", 2); - var docId = idParts[0]; + var docId = decodeURIComponent(idParts[0]); var docRev = (idParts.length > 1) ? idParts[1] : null; var db = new CouchDB(dbName); var doc = db.open(docId, {revs_info: true}); |