WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] [Plugin: WP e-Commerce] Ampersands and breadcrumbs (5 posts)

  1. joesmalley
    Member
    Posted 2 years ago #

    If I put an ampersand (&) in my category title, they show as '&' in the breadcrumbs

    http://wordpress.org/extend/plugins/wp-e-commerce/

  2. mikeaag
    Member
    Posted 2 years ago #

    im getting the same problem

    its not correctly converting "& amp ;"(without spaces) to "&"

  3. gopal1035
    Member
    Posted 2 years ago #

    I'm also having the same issue.
    (But it shows & okay in the sidebar Product Categories)

  4. b_asaro
    Member
    Posted 2 years ago #

    I fixed this by making a change(s) in breadcrumbs.class.php.

    Apparently the ampersands are already encoded (not sure if by core or breadcrumbs code, likely core?)

    So by turning off the optional flag double_encode, we can fix this:

    Version WPEC 3.8.5 \wpsc-includes\breadcrumbs.class.php
    CHANGE: (found in 3 different places)
    'name' => htmlentities($wp_query->post->post_title, ENT_QUOTES, 'UTF-8')

    TO:
    'name' => htmlentities($wp_query->post->post_title, ENT_QUOTES, 'UTF-8', false)

    Ampersands are the only funky chars I have in my categories so it's all I've tested, but presumably it should work for anything.

  5. Justin Sainton
    Member
    Plugin Author

    Posted 2 years ago #

    Interesting find.

    Rather than using htmlentities, we should likely be using esc_html here. I've opened a ticket in our Google Code Tracker, it will be fixed in the upcoming 3.8.9 release. Marking as resolved for now.

    http://code.google.com/p/wp-e-commerce/issues/detail?id=1111

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic