summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2011-01-11 01:23:37 +0000
committerPaul Joseph Davis <davisp@apache.org>2011-01-11 01:23:37 +0000
commit89d5db841148b829a49dec2d8de7f6f2ff50945c (patch)
treeada709aec011100889f72b57f8a6948d622108d8 /share
parent79bea41bac270c6105427e5680f4b9716d8fd411 (diff)
parent6ce291d3d3ccac65c082c787e9540fd187c225be (diff)
Tagging 1.0.2
git-svn-id: https://svn.apache.org/repos/asf/couchdb/tags/1.0.2@1057433 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/database.html4
-rw-r--r--share/www/script/couch_test_runner.js2
-rw-r--r--share/www/script/futon.browse.js8
3 files changed, 9 insertions, 5 deletions
diff --git a/share/www/database.html b/share/www/database.html
index 2802ad78..9a9f121e 100644
--- a/share/www/database.html
+++ b/share/www/database.html
@@ -40,6 +40,10 @@ specific language governing permissions and limitations under the License.
$("h1 strong").text(page.db.name);
var viewPath = page.viewName || "_all_docs";
if (viewPath != "_temp_view" && viewPath != "_design_docs") {
+ viewPath = $.map(viewPath.split("/"), function (part) {
+ return encodeURIComponent(part);
+ }).join("/");
+
$("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
"/" + viewPath);
}
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js
index 56787e9a..55a6533f 100644
--- a/share/www/script/couch_test_runner.js
+++ b/share/www/script/couch_test_runner.js
@@ -18,7 +18,7 @@ function loadScript(url) {
if((url.substr(0, 7) == "http://")
|| (url.substr(0, 2) == "//")
|| (url.substr(0, 5) == "data:")
- || (url.substr(0, 11) == "javsacript:")) {
+ || (url.substr(0, 11) == "javascript:")) {
throw "Not loading remote test scripts";
}
if (typeof document != "undefined") document.write('<script src="'+url+'"></script>');
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
index 17975de2..6b3c979c 100644
--- a/share/www/script/futon.browse.js
+++ b/share/www/script/futon.browse.js
@@ -116,7 +116,7 @@
var viewName = (urlParts.length > 0) ? urlParts.join("/") : null;
if (viewName) {
- $.futon.storage.set("view", viewName);
+ $.futon.storage.set("view", decodeURIComponent(viewName));
} else {
viewName = $.futon.storage.get("view");
if (viewName) {
@@ -128,6 +128,7 @@
var db = $.couch.db(dbName);
this.dbName = dbName;
+ viewName = decodeURIComponent(viewName);
this.viewName = viewName;
this.viewLanguage = "javascript";
this.db = db;
@@ -578,7 +579,7 @@
this.updateDesignDocLink = function() {
if (viewName && /^_design/.test(viewName)) {
- var docId = "_design/" + decodeURIComponent(viewName.split("/")[1]);
+ var docId = "_design/" + encodeURIComponent(decodeURIComponent(viewName).split("/")[1]);
$("#designdoc-link").attr("href", "document.html?" +
encodeURIComponent(dbName) + "/" + $.couch.encodeDocId(docId)).text(docId);
} else {
@@ -774,8 +775,7 @@
if (page.isDirty) {
db.query(currentMapCode, currentReduceCode, page.viewLanguage, options);
} else {
- var viewParts = viewName.split('/');
-
+ var viewParts = decodeURIComponent(viewName).split('/');
if ($.futon.storage.get("stale")) {
options.stale = "ok";
}