diff --git a/public/script/app.js b/public/script/app.js
index 833c52a..4b97128 100644
--- a/public/script/app.js
+++ b/public/script/app.js
@@ -593,7 +593,9 @@ angular
if (dir) {
output += `${name}`;
} else {
- output += `${name}`;
+ output += `${name}`;
}
if (truncated) {
output += ``;
@@ -2255,7 +2257,9 @@ angular
}
// redirect to readme
- $location.url(uri + readmeCandidates[best_match]);
+ $location.url(
+ uri + encodePathForUrl(readmeCandidates[best_match])
+ );
}
}
$scope.getFiles = async function (path) {
@@ -2353,11 +2357,15 @@ angular
// server returns a fresh ETag on first hit either way.
const sha = (fileInfo && fileInfo.sha) || "0";
$http
- .get(`/api/repo/${$scope.repoId}/file/${path}?v=` + sha, {
- transformResponse: (data) => {
- return data;
- },
- })
+ .get(
+ `/api/repo/${$scope.repoId}/file/${encodePathForUrl(path)}?v=` +
+ sha,
+ {
+ transformResponse: (data) => {
+ return data;
+ },
+ }
+ )
.then(
(res) => {
$scope.type = originalType;
@@ -2427,7 +2435,9 @@ angular
if ($scope.file && $scope.file.sha) {
fileVersion = $scope.file.sha;
}
- $scope.url = `/api/repo/${$scope.repoId}/file/${$scope.filePath}?v=${fileVersion}`;
+ $scope.url = `/api/repo/${$scope.repoId}/file/${encodePathForUrl(
+ $scope.filePath
+ )}?v=${fileVersion}`;
let extension = $scope.filePath.toLowerCase();
const extensionIndex = extension.lastIndexOf(".");
diff --git a/public/script/bundle.min.js b/public/script/bundle.min.js
index a3c7988..511ce8f 100644
--- a/public/script/bundle.min.js
+++ b/public/script/bundle.min.js
@@ -2621,5 +2621,5 @@ Expecting `+E.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on l
:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(n+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),i instanceof Map){let e=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];i.forEach(t=>{gq(t.styles)||e.forEach(e=>{n+=$Fe(t.id,e,t.styles)}),gq(t.textStyles)||(n+=$Fe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),RFe=mt((e,t,i,n)=>{i=LFe(e,i);return uFe(aFe(n+`{${ch(t,i,e.themeVariables)}}`),dFe)},"createUserStyles"),MFe=mt((e="",t,i)=>{let n=e;return i||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=n_(n)).replace(/
/g,"
")},"cleanUpSvgCode"),IFe=mt((e="",t)=>{return`