Skip to content

Commit c727f99

Browse files
committed
Fix bug because of filename escape chars
1 parent 581e415 commit c727f99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/markup/renderer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"path/filepath"
1313
"strings"
1414
"sync"
15+
"net/url"
1516

1617
"code.gitea.io/gitea/modules/git"
1718
"code.gitea.io/gitea/modules/setting"
@@ -143,7 +144,7 @@ onload="this.height=ifd.document.body.scrollHeight" width="100%%" scrolling="no"
143144
ctx.Metas["user"],
144145
ctx.Metas["repo"],
145146
ctx.Metas["BranchNameSubURL"],
146-
ctx.Filename,
147+
url.PathEscape(ctx.Filename),
147148
))
148149
return err
149150
}

0 commit comments

Comments
 (0)