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

Permit syntactic oddities? #6

Closed
mlhetland opened this issue Apr 26, 2020 · 2 comments
Closed

Permit syntactic oddities? #6

mlhetland opened this issue Apr 26, 2020 · 2 comments

Comments

@mlhetland
Copy link

mlhetland commented Apr 26, 2020

I may be missing some mechanism in the current library, but while trying to recreate some existing HTML5, I ran into the following roadblocks (for non-XML HTML5 syntax oddities):

  • Equals-signs in attribute values are auto-escaped, which means I can't generate, e.g., content="width=device-width, initial-scale=1".
  • Attributes must have values, which means I can't generate, e.g., <script defer …>.
  • Tags are always closed (either empty or with a closing tag), which means I can't generate, e.g., <meta charset="utf-8">.

Now, it may be that the more XML-friendly 'width&#61;device-width …', defer="" and <meta …/> are just fine HTML5-wise – so permitting stuff light this might just add unnecessary complication? ¯_(ツ)_/¯

(BTW, for the value-less attributes, I tested using defer=nothing – a solution I've used myself in similar situations, but that seems to have broken the rendering completely, including for the following attributes.)

@tkluck
Copy link
Owner

tkluck commented Apr 26, 2020

This all makes sense! I created #7 #8 #9 to track the individual issues you raise. I'll close this one to keep it organised.

@tkluck tkluck closed this as completed Apr 26, 2020
@mlhetland
Copy link
Author

Thanks! (I debated creating multiple issues, but decided against it, since I was unsure about the merit of it all.)

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

2 participants