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

  1. joesmalley
    Posted 3 years ago #

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


  2. mikeaag
    Posted 3 years ago #

    im getting the same problem

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

  3. gopal1035
    Posted 3 years ago #

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

  4. b_asaro
    Posted 3 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')

    '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
    Plugin Author

    Posted 3 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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic