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

Allow HTML boolean attributes #318

Open
clj opened this issue Aug 3, 2023 · 2 comments
Open

Allow HTML boolean attributes #318

clj opened this issue Aug 3, 2023 · 2 comments
Labels
bug Something isn't working low priority

Comments

@clj
Copy link

clj commented Aug 3, 2023

The following example, using a boolean attribute on the <ol> tag (see: docs at MDN and WHATWG ), does not work:

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>
          <ol reversed>
            <li>Second</li>
            <li>First</li>
          </ol>
        </mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Boolean attributes can be expressed in some other ways, to work around this, the following work:

 <ol reversed="">
 <ol reversed="reversed">

and these don't:

 <ol reversed>
 <ol reversed=reversed>

The former are valid XML the latter not, which may explain things (see: #221)

This is also the case in <mj-raw> tags, which is where I am actually trying to use a tag with a boolean attribute. I can obviously work around it, but this behaviour is inconsistent with the mjml.io implementation.

@jdrouet jdrouet added the bug Something isn't working label Aug 5, 2023
@jdrouet
Copy link
Owner

jdrouet commented Aug 5, 2023

Thanks for your feedback!
Right now, this issue seems to be related to the xmlparser used under the hood. I'm considering forking it to adapt it to html.
But for now, I'll keep this bug open but I don't consider it a priority for now.

@clj
Copy link
Author

clj commented Aug 5, 2023

Thanks for having a look! I agree that this one is fairly low priority and easily worked around. It also generates an error, so easy to detect as well. A future fix would still be great of course!

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