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

Support void (self-closing) HTML elements in mj-raw #432

Open
tstriker opened this issue Jun 14, 2024 · 2 comments
Open

Support void (self-closing) HTML elements in mj-raw #432

tstriker opened this issue Jun 14, 2024 · 2 comments
Labels
bug Something isn't working low priority

Comments

@tstriker
Copy link

I bumped into this while switching from node version to the python one (which is a port of this lib, i believe).

There is a number of 'void' elements that do not require closing in HTML:
https://developer.mozilla.org/en-US/docs/Glossary/Void_element

however, the lib right now seems to be tripping on them with "unexpected end of stream"

the node version does not seem to have a similar limitation, so seems like could be useful to address these void elements.

thank you for the lib!

@jdrouet
Copy link
Owner

jdrouet commented Jun 14, 2024

Hey,
Could you provide an example?
I'm already hunting them but some might not be caught by the CI

@tstriker tstriker changed the title Support void (self-closing) HTML elements Support void (self-closing) HTML elements in mj-raw Jun 21, 2024
@tstriker
Copy link
Author

Updated the bug title as i realized that it is specific to contents of mj-raw.
Here's a quick snippet of MJML that triggers the unexpected end of stream:

<mjml>
  <mj-body>
    <mj-raw>
      <img src="bananas">
    </mj-raw>
  </mj-body>
</mjml>

@jdrouet jdrouet added bug Something isn't working low priority labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

2 participants