summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-21 20:11:31 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-21 20:11:31 +0000
commit3de248e62554b399cfa658d9ac1cf088d0b66381 (patch)
treec3b00e5df602009682653b40fa9a11b60d457e6c
parent62f14dff648aadc10a25af59ff45c3825c637030 (diff)
Fix for view name encoding in Futon, for database names containing slashes. Closes COUCHDB-214 (again).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@736400 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/futon.browse.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
index db899df3..cff08c8c 100644
--- a/share/www/script/futon.browse.js
+++ b/share/www/script/futon.browse.js
@@ -103,7 +103,8 @@
viewName = $.cookies.get(dbName + ".view", "");
if (viewName) {
this.redirecting = true;
- location.href = "database.html?" + dbName + "/" + viewName;
+ location.href = "database.html?" + encodeURIComponent(dbName) +
+ "/" + encodeDocId(viewName);
}
}
var db = $.couch.db(dbName);
@@ -969,7 +970,7 @@
if (parts[0] == '_design') {
parts.shift();
encoded = encodeURIComponent(parts.join('/'));
- return '_design/'+encoded;
+ return '_design/' + encoded;
} else {
return encodeURIComponent(docid);
}