-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
HTML attributes that aren't pre-escaped? #1823
Comments
Yeah, that makes sense. I've been talking with @watzon on doing better integration with HTMX for Lucky. Another thing needed would be allowing Actions as attribute values. |
https://github.com/guilleiguaran/rails-htmx looks like a decent start at what an integration could look like for Lucky. |
I was actually looking at the Laravel HTMX library as inspiration, but that Rails one could be a good pattern too |
Actually, it appears I only assumed this pre-escaped text was breaking with htmx, because it looked weird in the dev tools. But it actually works fine. So, maybe this isn't really a bug... |
@mdwagner : Thanks for opening this issue, I'm bumping my head into this issue right now (trying to pass the Are you sure your request has a More on topic, when using the https://luckyframework.org/html tool to "translate" this If the tool is reliable, then it is a bug :-) |
@rmarronnier But to your point, yes, I can confirm it does add the correct headers to my outgoing request (I put |
Good idea, I'll open an issue.
I'll try that. |
When using LuckyHTML, I've noticed you don't need to run
HTML.escape
, as it does this for you behind the scenes (#9). Normally, this would make sense to do on everything: both text and attributes.However, if you're using something like htmx for your client-server interactions, there are situations where the attributes shouldn't be pre-escaped.
As an example, this
becomes this
which is undesirable
(and broken).We could provide a new tag method that will not escape attributes (you can already do unescaped text with the
raw
tag helper), but idk if anyone has any other ideas.The text was updated successfully, but these errors were encountered: