1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-28 16:17:02 +00:00

[wiki] redirect dir page (#2352)

This commit is contained in:
C_Q
2018-09-07 22:25:13 +08:00
committed by Daniel Pan
parent 75932af704
commit 6e873ef029
2 changed files with 26 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ class EditorUtilities {
url = serviceUrl + "/lib/" + repoID + "/file" + encodeURIComponent(fileNode.path());
}
} else {
url = serviceUrl + "/#common/lib/" + repoID + "/" + encodeURIComponent(fileNode.path());
url = serviceUrl + "/#common/lib/" + repoID + encodeURIComponent(fileNode.path());
}
return url;
}
@@ -108,7 +108,7 @@ class EditorUtilities {
isInternalDirLink(url) {
var re = new RegExp(serviceUrl + "/#[a-z\-]*?/lib/" + "[0-9a-f\-]{36}/.*");
var re = new RegExp(serviceUrl + "/#[a-z\-]*?/lib/" + "[0-9a-f\-]{36}.*");
return re.test(url);
}