Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more support for SVG related self-closing tags in Document filter #405

Open
ediamin opened this issue Nov 8, 2021 · 2 comments
Open
Labels
DOM P2 Low Priority

Comments

@ediamin
Copy link
Collaborator

ediamin commented Nov 8, 2021

There are many empty elements in SVG than just circle, g and path tags. For example:

  • use
  • rect
  • image
  • polygon
  • ellipse
  • etc

Technically in SVG (as XML), any element can be self-closing, even if they aren't defined as empty (e.g. g).

Should this not be comprehensive? Or is it exclusively just to make the tests pass?

cf. ampproject/amp-wp#6657 (comment)

Originally posted by @westonruter in #210 (comment)

@ediamin ediamin added the DOM label Nov 8, 2021
@westonruter
Copy link
Member

If browsers properly handle the parsing of self-closing SVG tags in HTML the same way as empty SVG tags, then I suppose there's no need to go further here.

@schlessera
Copy link
Collaborator

Yes, there's no technical need from the browser's point of view. But for the sake of consistency and for being able to build reliable tests against anything that includes SVGs, it would be preferable to have a clean normalization of these tags that we can test against.

No immediate action needed here for now, we just wanted to ensure this is not lost in case we need to revisit.

@schlessera schlessera added the P2 Low Priority label Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOM P2 Low Priority
Projects
None yet
Development

No branches or pull requests

3 participants