summaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-16 15:34:46 -0400
committerUnknwon <u@gogs.io>2015-09-16 15:34:46 -0400
commit2729eb998c8f18c2445269009b18048e0b2f4742 (patch)
treeabfbb572e6f5a5e6c536365ab02b80627fae0d00 /modules/base
parentb003b187883ea50c10b709ca97c26ecf1d9631bb (diff)
downloadgitea-2729eb998c8f18c2445269009b18048e0b2f4742.tar.gz
gitea-2729eb998c8f18c2445269009b18048e0b2f4742.zip
#1646 and other minor fixes
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/template.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/base/template.go b/modules/base/template.go
index 6fc449a6a6..2571e7d244 100644
--- a/modules/base/template.go
+++ b/modules/base/template.go
@@ -101,10 +101,6 @@ func RenderCommitMessage(msg, urlPrefix string) template.HTML {
return template.HTML(string(RenderIssueIndexPattern([]byte(template.HTMLEscapeString(msg)), urlPrefix)))
}
-var mailDomains = map[string]string{
- "gmail.com": "gmail.com",
-}
-
var TemplateFuncs template.FuncMap = map[string]interface{}{
"GoVer": func() string {
return strings.Title(runtime.Version())
@@ -150,12 +146,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
return "try.gogs.io"
}
- suffix := strings.SplitN(mail, "@", 2)[1]
- domain, ok := mailDomains[suffix]
- if !ok {
- return "mail." + suffix
- }
- return domain
+ return strings.SplitN(mail, "@", 2)[1]
},
"SubStr": func(str string, start, length int) string {
if len(str) == 0 {