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 {
38
38
"SafeHTML" : SafeHTML ,
39
39
"HTMLFormat" : HTMLFormat ,
40
40
"HTMLEscape" : HTMLEscape ,
41
- "QueryEscape" : url . QueryEscape ,
41
+ "QueryEscape" : QueryEscape ,
42
42
"JSEscape" : JSEscapeSafe ,
43
43
"SanitizeHTML" : SanitizeHTML ,
44
44
"URLJoin" : util .URLJoin ,
@@ -226,6 +226,10 @@ func JSEscapeSafe(s string) template.HTML {
226
226
return template .HTML (template .JSEscapeString (s ))
227
227
}
228
228
229
+ func QueryEscape (s string ) template.URL {
230
+ return template .URL (url .QueryEscape (s ))
231
+ }
232
+
229
233
// DotEscape wraps a dots in names with ZWJ [U+200D] in order to prevent autolinkers from detecting these as urls
230
234
func DotEscape (raw string ) string {
231
235
return strings .ReplaceAll (raw , "." , "\u200d .\u200d " )
You can’t perform that action at this time.
0 commit comments