couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r647906 - in /incubator/couchdb/branches/futon-async/share/www: browse/database.html index.html script/browse.js
Date Mon, 14 Apr 2008 17:07:35 GMT
Author: cmlenz
Date: Mon Apr 14 10:07:28 2008
New Revision: 647906

URL: http://svn.apache.org/viewvc?rev=647906&view=rev
Log:
futon-async branch: fixes for links missing URL encoding.

Modified:
    incubator/couchdb/branches/futon-async/share/www/browse/database.html
    incubator/couchdb/branches/futon-async/share/www/index.html
    incubator/couchdb/branches/futon-async/share/www/script/browse.js

Modified: incubator/couchdb/branches/futon-async/share/www/browse/database.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/futon-async/share/www/browse/database.html?rev=647906&r1=647905&r2=647906&view=diff
==============================================================================
--- incubator/couchdb/branches/futon-async/share/www/browse/database.html [utf-8] (original)
+++ incubator/couchdb/branches/futon-async/share/www/browse/database.html [utf-8] Mon Apr
14 10:07:28 2008
@@ -30,7 +30,8 @@
     <script>
       var page = new CouchDatabasePage();
       if (window != parent) {
-        parent.updateNavigation(location.pathname, location.search.split("/", 2)[0]);
+        parent.updateNavigation(location.pathname,
+          encodeURIComponent(location.search.split("/", 2)[0]));
       }
 
       $(document).ready(function() {

Modified: incubator/couchdb/branches/futon-async/share/www/index.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/futon-async/share/www/index.html?rev=647906&r1=647905&r2=647906&view=diff
==============================================================================
--- incubator/couchdb/branches/futon-async/share/www/index.html [utf-8] (original)
+++ incubator/couchdb/branches/futon-async/share/www/index.html [utf-8] Mon Apr 14 10:07:28
2008
@@ -36,8 +36,9 @@
           success: function(dbs, status) {
             for (var i = 0; i < dbs.length; i++) {
               var dbName = dbs[i];
-              list.append("<li><a href='browse/database.html?" + dbName +
-                "' target='content'>" + dbName + "</a></li>");
+              list.append("<li><a href='browse/database.html?" +
+                encodeURIComponent(dbName) + "' target='content'>" + dbName +
+                "</a></li>");
             }
           }
         });

Modified: incubator/couchdb/branches/futon-async/share/www/script/browse.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/futon-async/share/www/script/browse.js?rev=647906&r1=647905&r2=647906&view=diff
==============================================================================
--- incubator/couchdb/branches/futon-async/share/www/script/browse.js [utf-8] (original)
+++ incubator/couchdb/branches/futon-async/share/www/script/browse.js [utf-8] Mon Apr 14 10:07:28
2008
@@ -498,11 +498,13 @@
         }
         if (currentIndex < revs.length - 1) {
           var prevRev = revs[currentIndex + 1].rev;
-          $("#paging a.prev").attr("href", "?" + dbName + "/" + docId + "@" + prevRev);
+          $("#paging a.prev").attr("href", "?" + encodeURIComponent(dbName) +
+            "/" + encodeURIComponent(docId) + "@" + prevRev);
         }
         if (currentIndex > 0) {
           var nextRev = revs[currentIndex - 1].rev;
-          $("#paging a.next").attr("href", "?" + dbName + "/" + docId + "@" + nextRev);
+          $("#paging a.next").attr("href", "?" + encodeURIComponent(dbName) +
+            "/" + encodeURIComponent(docId) + "@" + nextRev);
         }
         $("#fields tbody.footer td span").text("Showing revision " +
           (revs.length - currentIndex) + " of " + revs.length);



Mime
View raw message