File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func NewFuncMap() template.FuncMap {
3838 "SafeHTML" : SafeHTML ,
3939 "HTMLFormat" : HTMLFormat ,
4040 "HTMLEscape" : HTMLEscape ,
41- "QueryEscape" : url . QueryEscape ,
41+ "QueryEscape" : QueryEscape ,
4242 "JSEscape" : JSEscapeSafe ,
4343 "SanitizeHTML" : SanitizeHTML ,
4444 "URLJoin" : util .URLJoin ,
@@ -226,6 +226,10 @@ func JSEscapeSafe(s string) template.HTML {
226226 return template .HTML (template .JSEscapeString (s ))
227227}
228228
229+ func QueryEscape (s string ) template.URL {
230+ return template .URL (url .QueryEscape (s ))
231+ }
232+
229233// DotEscape wraps a dots in names with ZWJ [U+200D] in order to prevent autolinkers from detecting these as urls
230234func DotEscape (raw string ) string {
231235 return strings .ReplaceAll (raw , "." , "\u200d .\u200d " )
You can’t perform that action at this time.
0 commit comments