diff options
author | Unknwon <u@gogs.io> | 2015-08-08 17:10:34 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-08 17:10:34 +0800 |
commit | 9db4acc62e2d253c21ce9aed2e21003ff235d5b5 (patch) | |
tree | 1718b390dce8fb2e0771f4033cb1f6b24d66f0b3 /modules/base | |
parent | e6862e9cec49acf1cf8bbb5d1baee299a52b4967 (diff) | |
download | gitea-9db4acc62e2d253c21ce9aed2e21003ff235d5b5.tar.gz gitea-9db4acc62e2d253c21ce9aed2e21003ff235d5b5.zip |
improve fork process
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/template.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/base/template.go b/modules/base/template.go index 2a81a34d26..0d68254561 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -20,6 +20,10 @@ import ( "github.com/gogits/gogs/modules/setting" ) +func Safe(raw string) template.HTML { + return template.HTML(raw) +} + func Str2html(raw string) template.HTML { return template.HTML(Sanitizer.Sanitize(raw)) } @@ -128,6 +132,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{ return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" }, "AvatarLink": AvatarLink, + "Safe": Safe, "Str2html": Str2html, "TimeSince": TimeSince, "FileSize": FileSize, |