Zen Follower
- Join Date:
- Jul 2009
- Location:
- Texas
- Posts:
- 210
- Plugin Contributions:
- 0
[Done v155b] Ampersands can't be edited correctly in categories - Fix included
I've been discovering recently that any of my categories with ampersands were getting messed up. The problem seemed to be that every time an ampersand was used it was translated to &. Then on subsequent edits it would translate to &.
This would cause problems viewing the category on the front end. And the only way around it was to repeatedly remove the added amp; to your category names.
I traced this down, and found htmlspecialchars to be the culprit. Specifically 'categories_name' was not being sanitized correctly in the _POST and as a result was being run through filterStrictSantizeKeys which has an htmlspecialchars in it.
I fixed this by adding 'categories_name' to line 198 like so:
$group = array('pages_title', 'categories_name', 'page_params', 'music_genre_name', 'artists_name', 'record_company_name', 'countries_name', 'name', 'type_name', 'manufacturers_name',
'title', 'coupon_name', 'banners_title', 'coupon_code', 'group_name', 'geo_zone_name', 'geo_zone_description',
'tax_class_description', 'tax_class_title', 'tax_description', 'entry_company', 'customers_firstname',
'customers_lastname', 'entry_street_address', 'entry_suburb', 'entry_city', 'entry_state', 'customers_referral',
'symbol_left', 'symbol_right');
$sanitizer->addSimpleSanitization('WORDS_AND_SYMBOLS_REGEX', $group);
Not entirely sure if that's the right place. But I do know it fixes this bug.
DentalPlanet Designed/Administrated by Falls Geek