-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create types for avoiding escaping #77
Comments
If anything, I feel like this should be fragments, because that's prone to XSS and it doesn't need to be. Strings should be avoided where possible. |
@vendethiel sorry, what do you mean by fragments? |
But using those types, wouldn't that mean you KNOW that's HTML or JS?! you WANT that to not be escaped? The same as using &HTML and &HTML-AND-JAVASCRIPT |
I mean that, in your example, |
My suggestion was more on a automated way of making a return not being escaped then how to make that. |
It would be very helpful if there were 2 types (maybe 2 roles) that when a template tag recipe an instance of that type,
it would automatically avoiding escaping it. Maybe it could be something like HSML and JAVASCRIPT roles and that would
automatically apply &HTML and &HTML-AND_JAVASCRIPT (maybe a &JAVASCRIPT if that exists), so when doing:
and the object on $_ has something like:
it would behave as it were:
and also existing:
if we have:
and that returns something like:
it would be equivalent to:
and the same for JS
The text was updated successfully, but these errors were encountered: