|
|
@@ -75,7 +75,7 @@ func (f *funcMap) Map() template.FuncMap {
|
|
|
"contains": func(str, substr string) bool {
|
|
|
return strings.Contains(str, substr)
|
|
|
},
|
|
|
- "replace": func(str, old string, new string) string {
|
|
|
+ "replace": func(str, old, new string) string {
|
|
|
return strings.Replace(str, old, new, 1)
|
|
|
},
|
|
|
"isodate": func(ts time.Time) string {
|
|
|
@@ -86,7 +86,7 @@ func (f *funcMap) Map() template.FuncMap {
|
|
|
},
|
|
|
"icon": func(iconName string) template.HTML {
|
|
|
return template.HTML(fmt.Sprintf(
|
|
|
- `<svg class="icon" aria-hidden="true"><use xlink:href="%s#icon-%s"></svg>`,
|
|
|
+ `<svg class="icon" aria-hidden="true"><use xlink:href="%s#icon-%s"/></svg>`,
|
|
|
route.Path(f.router, "appIcon", "filename", "sprite.svg"),
|
|
|
iconName,
|
|
|
))
|