Permission titles are html code already, see
http://cgit.drupalcode.org/drupal/tree/modules/user/user.admin.inc?h=7.x...
So no check_plain() is necessary for them.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views-2779497-4.patch | 783 bytes | silvi.addweb |
Permission titles are html code already, see
http://cgit.drupalcode.org/drupal/tree/modules/user/user.admin.inc?h=7.x...
So no check_plain() is necessary for them.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views-2779497-4.patch | 783 bytes | silvi.addweb |
Comments
Comment #2
maximpodorov commentedComment #3
chris matthews commentedThe 2 year old patch in #2 to views_handler_filter_user_permissions.inc does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.
Comment #4
silvi.addweb commented@Chris2, I Replaced "check_plain" with "strip_tags" function for the views 7.x-3.x-dev. Kindly review my attached patch.
Thanks
Comment #5
damienmckennaComment #6
renatog commentedHummmm maybe it makes sense
So as I understood $permission titles are html code already, so isn't necessary use
$this->value_options[$perm] = check_plain(strip_tags($perm_item['title']));Because check_plain is unnecessary, and we can use only:
$this->value_options[$perm] = strip_tags($perm_item['title']);That's right?!
It really makes sense to me, but I can't read your "source" because this link that you provided as proof of your concept points to a huge file without line reference so I couldn't find what is the exact line that you want to show
If someone can confirm that's true will helps a lot
Comment #7
maximpodorov commentedThe updated link:
https://git.drupalcode.org/project/drupal/blob/7.x/modules/user/user.adm...
It was used to show that permission titles are HTML markup.
Comment #8
renatog commentedCool! Thanks a lot @maximpodorov
So really makes sense to me. Moving to RTBC
Is anyone against this?
Comment #9
damienmckennaI believe the correct way of looking at this is that when the items are rendered on the page as a select tag the options pass through form_select_options() which passes both the option key and title through check_plain().
Comment #11
damienmckennaCommitted. Thank you all for your work to resolve this.