From 3de248e62554b399cfa658d9ac1cf088d0b66381 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Wed, 21 Jan 2009 20:11:31 +0000 Subject: 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 --- share/www/script/futon.browse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'share') 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); } -- cgit v1.2.3