Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    209
    Plugin Contributions
    2

    Default [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:
    Code:
    $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.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Ampersands can't be edited correctly in categories - Fix included

    Have you applied the latest bug fixes?
    https://www.zen-cart.com/showthread....29-with-v1-5-5
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    209
    Plugin Contributions
    2

    Default Re: Ampersands can't be edited correctly in categories - Fix included

    Yes.

    But just to check, I installed 1.5.5a and then the latest trustwave security patch. This is the result of changing the Hardware category to Hardware & Stuff and then editing and saving a few times with no change.

    Name:  Bugged.png
Views: 147
Size:  14.1 KB

  4. #4
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    209
    Plugin Contributions
    2

    Default Re: Ampersands can't be edited correctly in categories - Fix included

    I noticed this has been fixed in the latest security patch release. If your having problems, re-applying the security patch with the latest code should fix it.

  5. #5
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,289
    Plugin Contributions
    22

    Default Re: Ampersands can't be edited correctly in categories - Fix included

    I just did that and though it fixed the problem with titles, I have an ez page link index.php?main_page=index&cPath=15 that the & is being rewritten and breaking the link in the menu.
    The full-time Zen Cart Guru. WizTech4ZC.com

 

 

Similar Threads

  1. v155 [Done v155b] AJAX: Session-variable changes not saved
    By lat9 in forum Bug Reports
    Replies: 5
    Last Post: 18 Aug 2016, 12:20 PM
  2. Replies: 3
    Last Post: 15 Jul 2016, 03:40 AM
  3. [Done v2.0] HTMLarea not showing -> fix included
    By masterblaster in forum Bug Reports
    Replies: 10
    Last Post: 26 Feb 2008, 12:04 AM
  4. Replies: 3
    Last Post: 14 Jan 2008, 03:18 PM
  5. [Done v1.3.9] Ampersands in descriptions
    By cannibal_bill in forum Bug Reports
    Replies: 2
    Last Post: 12 Dec 2007, 02:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR