fix: remove xlink:href attributes from image elements in SVG content

This commit is contained in:
Tomáš Mládek 2025-07-27 21:33:28 +02:00
parent 610d8350af
commit b7b9b1624d

View file

@ -469,6 +469,10 @@ async function processScrolls(svg: XMLDocument): Promise<VideoScrollDef[]> {
return Promise.all( return Promise.all(
Array.from(svg.getElementsByTagName("image")) Array.from(svg.getElementsByTagName("image"))
.map((el) => {
el.removeAttribute("xlink:href");
return el;
})
.filter((el) => .filter((el) =>
Array.from(el.children).some((el) => el.tagName == "desc") Array.from(el.children).some((el) => el.tagName == "desc")
) )