diff options
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 2a81a34d..0d682545 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, |