1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

refactor(template): use modern svg directive

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/use
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/xlink:href

> Warning: Since SVG 2, the xlink:href attribute is deprecated in favor of
href. See xlink:href page for more information.
This commit is contained in:
jvoisin 2025-08-11 17:20:33 +02:00 committed by Frédéric Guillot
parent 3a01f8a691
commit 884521a7dd

View file

@ -86,7 +86,7 @@ func (f *funcMap) Map() template.FuncMap {
"theme_color": model.ThemeColor,
"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 href="%s#icon-%s"/></svg>`,
route.Path(f.router, "appIcon", "filename", "sprite.svg"),
iconName,
))