mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user