On node_edit screen suffix shows as it defined (ex. °C) but when node is viewed it looks like after check_plain()
Is it normal or should be fixed?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | number-prefix-356908-10.patch | 2.08 KB | bjaspan |
| #6 | number_prefix-356908-6.patch | 2.05 KB | yched |
| #4 | number_d7.patch | 1.38 KB | andypost |
| #1 | number_c_p_d6.patch | 1.06 KB | andypost |
Comments
Comment #1
andypostSuppose there's no need in check_plain because only developers allowed to edit prefix and suffix
Widget for editing is not escaped by visible by users
Comment #2
andypostcan someone review this patch?
Comment #3
andypostFirst update 7-version then backport
but this issue better move to drupal project
Comment #4
andypostComment #6
yched commentedFixed in CCK.
The answer is of course not to display admin-entered text unfiltered, but to apply consistent filtering - we can be more permissive than a strict check_plain, though.
Attached patch runs prefix and suffix through field_filter_xss()
Comment #7
andypostThanx for patching cck!
Is there a reason to check prefix and suffix if edit them only available for admin (developer)?
Comment #8
yched commentedYes. User with 'administer content types' perm != developer. You don't know what role assignments people use out there. *No* user input goes out unfiltered, that's e general rule.
Note that http://drupal.org/node/372836 specifically advises site admins to grant 'administer content types' perm with care.
Comment #9
andypostPatch applies by hand - but works fine on d7
thanks
Comment #10
bjaspan commentedI don't understand how the patch works for andypost in #9 because it does not actually remove the check_plain call which causes the problem. New patch attached that does. I'll call this "RTBC except I want yched to verify my change."
Comment #11
andypost@bjaspan you right about HEAD - patch #6 with typo, yched just forget to clean check_plain
but as http://drupal.org/cvs?commit=189120 code is same as you provide
Thanks for review
Comment #12
yched commentedRight, I made a mistake while transposing the D6 fix, sorry. #10 is RTBC.
Comment #13
webchickCommitted, thanks!