-
Notifications
You must be signed in to change notification settings - Fork 28
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
special characters in attribute names #212
Comments
Ewww... I don't really want to support non-standard attribute names in a HTML templating language. That said, it should be as simple as loosening the Blade parser rules. Which frameworks use these weird attribute names? |
This syntax is from vue.js, and I don't think they care about XHTML. As per the HTML5 specs, almost anything is valid in HTML attribute names:
Custom attributes are part of the specs, e.g., "data-" attributes, so it is reasonable to support them in a templating language, as I may legally want to have <p data-is.mine="foo"> in a perfectly valid HTML5 document, but blade would fail on the dot. Client-side frameworks all use their own attributes, which are technically invalid, but are stripped before being given to the browser: vue.js uses |
Hm, alright. If it's a Vue thing, I suppose the Blade parser should support it. Have you ever tried Riot.js? |
Just following up. Would you be willing to do a PR for this? It would likely involve updating the PEG.js parser rules. If you're uncomfortable doing so, I don't blame you... there's a small learning curve involved. |
Certain frameworks rely on specifically crafted attributes:
However, blade fails if given
This wouldn't work either:
The text was updated successfully, but these errors were encountered: