-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Do not escape hierarchical select #22991
Conversation
We already have 'cutouts' in the escape function to not escape assigned html. It isn't catching the hierarchical select elements - so I have marked a bunch to not be escaped. I could have handled in 'escape' but I think tpl handling is actually correct - the cutouts in the escape function was to get it to a more manageable level
(Standard links)
|
@eileenmcnaughton wouldn't we need to do this to literally every |
@colemanw so most of the common patterns are being skipped here .... civicrm-core/CRM/Core/Smarty.php Lines 417 to 443 in 42aa581
I think long term we probably SHOULD put the smarty:nodefaults after all html elements - because anything we auto-escape is a potential pattern to bypass security - but in order to get operational quickly I added all the carve outs for known patterns. They don't cover the hierarchical select & I figure it makes sense to do those in the way that seems more correct to me since they are not a huge volume. |
Ok |
Overview
Do not escape hierarchical select
Before
Escaping applied to these quickform html hierarchical select elements, breaking the script
After
Elements marked for 'smarty:nodefaults' so escaping is not applied
Technical Details
We already have 'cutouts' in the escape function to not escape assigned html.
It isn't catching the hierarchical select elements - so I have marked a bunch
to not be escaped. I could have handled in 'escape' but I think tpl handling
is actually correct - the cutouts in the escape function was to get it to
a more manageable level
Comments