aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/html.go
diff options
context:
space:
mode:
authorChaz Reid <charlesreid1@Gmail.com>2018-03-05 10:39:12 -0800
committerLauris BH <lauris@nix.lv>2018-03-05 20:39:12 +0200
commit69ea5e438538863056af3bd70d182096b68f0d4a (patch)
tree5d2458548e45798ddde4edb9b32572b13f55177b /modules/markup/html.go
parent171914e9a75de4d03beb1f9f365c03ac1aeeb3b5 (diff)
downloadgitea-69ea5e438538863056af3bd70d182096b68f0d4a.tar.gz
gitea-69ea5e438538863056af3bd70d182096b68f0d4a.zip
Fix wiki inter-links with cases and add tests for this case (#3560)
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r--modules/markup/html.go6
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 {