1
0
Fork 0
forked from forgejo/forgejo

markup: escape short wiki link (#4091)

This commit is contained in:
Antoine GIRARD 2018-06-15 14:42:49 +02:00 committed by Lunny Xiao
parent c919b07a53
commit 23ba5c870f
2 changed files with 29 additions and 0 deletions

View file

@ -469,6 +469,9 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) {
} else {
link = strings.Replace(link, " ", "-", -1)
}
if !strings.Contains(link, "/") {
link = url.PathEscape(link)
}
}
urlPrefix := ctx.urlPrefix
if image {