You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I place a PNG image in the document, it throws an error "Attribute xlink:href redefined". When I check the tag, there is a duplicate attribute xlink:href.
How to get rid of the duplication?
The text was updated successfully, but these errors were encountered:
If the xml already has an xlink:href attribute AND an href attribute, the href becomes xlink:href.
SVG2 removes the xlink namespace altogether,
and this attribute is now deprecated.
The "real solution" to this would be to figure out how to stop xlink:href from being written in the first place. (I mean, if backwards-compatibility isn't an issue for you)
Oddly enough, removing this line
// make sure we don't already have an `xlink:href` attributeif(illutratorCompat&&str.includes(" href=")&&!str.includes(" xlink:href=")){str=str.replace(" href="," xlink:href=");}
or simply "if it has both attributes don't do anything".
It solves the problem but feels hacky and wrong. Plus it might break other workflows?
So currently the entire image Base64 is written twice... once in the href attr and the other in the xlink namespace attr.
the xlink one can obviously be removed in the line after, but it's best not to create it at all.
When I place a PNG image in the document, it throws an error "Attribute xlink:href redefined". When I check the tag, there is a duplicate attribute xlink:href.
How to get rid of the duplication?
The text was updated successfully, but these errors were encountered: