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

valid SVG with embedded HTML containing <br/> tag fails with "unexpected close tag" #589

Open
pdaoust opened this issue Apr 19, 2024 · 0 comments

Comments

@pdaoust
Copy link

pdaoust commented Apr 19, 2024

I'm generating some Mermaid diagrams, and Mermaid uses HTML embedded in a foreignObject element. Whenever there are br elements in the HTML, netlify-plugin-checklinks fails with the error

inline Svg in <page.html>: about:blank:1:339: unexpected close tag.

Mermaid diagrams are kinda messy markup, but I've got it down to a minimal reproduction of sorts:

<html>
  <body>
    <svg viewBox="-8 -8 643.5166625976562 364" style="max-width: 100%;" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><foreignObject height="120" width="217.18333435058594"><p>type: artist_album_by_release_date<br/>tag: 1966-01-17</p></foreignObject></svg>
  </body>
</html>

(Note: Mermaid erroneously doesn't use self-closing br tags, but as you can see the minimal repro does.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant