Author: cmlenz Date: Wed Jan 21 12:11:31 2009 New Revision: 736400 URL: http://svn.apache.org/viewvc?rev=736400&view=rev Log: Fix for view name encoding in Futon, for database names containing slashes. Closes COUCHDB-214 (again).
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=736400&r1=736399&r2=736400&view=diff ============================================================================== --- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original) +++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Wed Jan 21 12:11:31 2009 @@ -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); }