From 9db4acc62e2d253c21ce9aed2e21003ff235d5b5 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 8 Aug 2015 17:10:34 +0800 Subject: improve fork process --- modules/base/template.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/base') 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, -- cgit v1.2.3