You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2013/12/23 14:59:46 UTC

git commit: updated refs/heads/ENCODE-EVERYTHING to 1e30c49

Updated Branches:
  refs/heads/ENCODE-EVERYTHING 204ca74f3 -> 1e30c49f3


regex fix


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1e30c49f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1e30c49f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1e30c49f

Branch: refs/heads/ENCODE-EVERYTHING
Commit: 1e30c49f339050e129ffe41dceac1ccb2bb43383
Parents: 204ca74
Author: suelockwood <de...@apache.org>
Authored: Fri Dec 20 19:53:54 2013 -0500
Committer: suelockwood <de...@apache.org>
Committed: Sat Dec 21 17:35:10 2013 -0500

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/resources.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1e30c49f/src/fauxton/app/modules/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 8e97f95..f833ded 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -142,7 +142,8 @@ function(app, FauxtonAPI) {
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
       if (this.isDdoc()){
-        return this.id;
+        var ddoc = this.id.replace(/^_design\//,"");
+        return "_design/"+app.mixins.safeURLName(ddoc);
       }else{
         return app.mixins.safeURLName(this.id);
       }
@@ -215,7 +216,7 @@ function(app, FauxtonAPI) {
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
-      var ddoc = this.id.replace(/_design\//,"");
+      var ddoc = this.id.replace(/^_design\//,"");
       return "_design/"+app.mixins.safeURLName(ddoc);
     }