aboutsummaryrefslogtreecommitdiffstats
path: root/modules/base/markdown.go
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-09-19 19:02:40 -0400
committer无闻 <joe2010xtmf@163.com>2014-09-19 19:02:40 -0400
commit6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (patch)
tree64a9ea617ba1f704139881c3960fa2425dad9018 /modules/base/markdown.go
parent4f74b4e6578be4251af65cd08daa37c884e431a0 (diff)
parent0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (diff)
downloadgitea-6a7bd097fe2b3e894830fc3fdb60dde5594b61d6.tar.gz
gitea-6a7bd097fe2b3e894830fc3fdb60dde5594b61d6.zip
Merge pull request #463 from chadoe/urlroot
Allow Gogs to run from a suburl behind a reverse proxy.
Diffstat (limited to 'modules/base/markdown.go')
-rw-r--r--modules/base/markdown.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index b8bd33e113..2aa81005bf 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -14,6 +14,7 @@ import (
"strings"
"github.com/gogits/gfm"
+ "github.com/gogits/gogs/modules/setting"
)
func isletter(c byte) bool {
@@ -112,7 +113,7 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {
ms := MentionPattern.FindAll(line, -1)
for _, m := range ms {
line = bytes.Replace(line, m,
- []byte(fmt.Sprintf(`<a href="/user/%s">%s</a>`, m[1:], m)), -1)
+ []byte(fmt.Sprintf(`<a href="%s/user/%s">%s</a>`, setting.AppRootSubUrl, m[1:], m)), -1)
}
}