diff options
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r-- | modules/markup/html.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go index 53f57af1e0..4f9d02a8ff 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -464,7 +464,11 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) { childNode.Parent = linkNode absoluteLink := isLinkStr(link) if !absoluteLink { - link = strings.Replace(link, " ", "+", -1) + if image { + link = strings.Replace(link, " ", "+", -1) + } else { + link = strings.Replace(link, " ", "-", -1) + } } urlPrefix := ctx.urlPrefix if image { |