+5
appview/pages/funcmap.go
+5
appview/pages/funcmap.go
···
7
7
"html/template"
8
8
"log"
9
9
"math"
10
+
"net/url"
10
11
"path/filepath"
11
12
"reflect"
12
13
"strings"
···
180
181
},
181
182
"cssContentHash": CssContentHash,
182
183
"fileTree": filetree.FileTree,
184
+
"pathUnescape": func(s string) string {
185
+
u, _ := url.PathUnescape(s)
186
+
return u
187
+
},
183
188
}
184
189
}
185
190
+2
-2
appview/pages/templates/repo/blob.html
+2
-2
appview/pages/templates/repo/blob.html
···
24
24
<a
25
25
href="{{ index . 1 }}"
26
26
class="text-bold text-gray-500 dark:text-gray-400 {{ $linkstyle }}"
27
-
>{{ index . 0 }}</a
27
+
>{{ pathUnescape (index . 0) }}</a
28
28
>
29
29
/
30
30
{{ else }}
31
31
<span class="text-bold text-black dark:text-white"
32
-
>{{ index . 0 }}</span
32
+
>{{ pathUnescape (index . 0) }}</span
33
33
>
34
34
{{ end }}
35
35
{{ end }}
+2
-2
appview/pages/templates/repo/tree.html
+2
-2
appview/pages/templates/repo/tree.html
···
1
-
{{ define "title"}}{{ range .BreadCrumbs }}{{ index . 0}}/{{ end }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
1
+
{{ define "title"}}{{ range .BreadCrumbs }}{{ pathUnescape (index . 0)}}/{{ end }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }}
2
2
3
3
4
4
{{ define "extrameta" }}
···
26
26
<div class="flex flex-col md:flex-row md:justify-between gap-2">
27
27
<div id="breadcrumbs" class="overflow-x-auto whitespace-nowrap text-gray-400 dark:text-gray-500">
28
28
{{ range .BreadCrumbs }}
29
-
<a href="{{ index . 1}}" class="text-bold text-gray-500 dark:text-gray-400 {{ $linkstyle }}">{{ index . 0 }}</a> /
29
+
<a href="{{ index . 1}}" class="text-bold text-gray-500 dark:text-gray-400 {{ $linkstyle }}">{{ pathUnescape (index . 0) }}</a> /
30
30
{{ end }}
31
31
</div>
32
32
<div id="dir-info" class="text-gray-500 dark:text-gray-400 text-xs md:text-sm flex flex-wrap items-center gap-1 md:gap-0">