minifiers: Keep x-bind and blank namespace in SVG minification

Update tdewolff/minify to v2.24.11 and add "" and "x-bind" to KeepNamespaces
to prevent Alpine.js directives from being stripped in SVGs.

This is a new option in tdewolff/minify v2.24.11, and it is needed to prevent breakage of Alpine.js, and possilby others, directives in SVGs.

Fixes #14669
This commit is contained in:
Bjørn Erik Pedersen
2026-03-25 19:17:11 +01:00
parent 0c013c2326
commit 42289d76f9
4 changed files with 12 additions and 4 deletions
+3
View File
@@ -158,6 +158,9 @@ func TestBugs(t *testing.T) {
{media.Builtin.HTMLType, "<i class='fas fa-tags fa-fw'></i> Tags", `<i class='fas fa-tags fa-fw'></i> Tags`},
// Issue #13082
{media.Builtin.HTMLType, "<gcse:searchresults-only></gcse:searchresults-only>", `<gcse:searchresults-only></gcse:searchresults-only>`},
// Issue #14669.
{media.Builtin.SVGType, `<use x-bind:href="myicon">`, `<use x-bind:href="myicon">`},
{media.Builtin.SVGType, `<use :href="myicon">`, `<use :href="myicon">`},
} {
var b bytes.Buffer