Hi all,

If you have custom breadcrumb titles of nodes that have quotes (" "), they are represented with the html characters "

To solve this, go to custom_breadcrumb.module, and add this line

$title = str_replace('"', '"', $title);

Before this one
$trail[] = _custom_breadcrumbs_create_crumb($title, $path);

Greetings

Comments

msmithcti’s picture

Thanks for posting this solution - I needed a few more strings replacing so used the following code:

$search = array('"', '&', ''');
$replace   = array('"', '&', "'");
$title = str_replace($search, $replace, $title);

In the same place as above.

I'm not sure this is the best solution - is there a reason quotes etc. are being replaced by their HTML entity codes in the first place?

lemming’s picture

This issue is also related to and resovled here (with a broader fix):

http://drupal.org/node/1446350

I also recommend avoiding the numerous fixes that encourage you to just decode the outputted result.

  1. It is inefficient. You run HTML twice, and then run decode to undo one of the last encoding.
  2. It does not cover cases where explicit text (non-tokens) are used. Items not processed with token replace have only been encoded once. Decoding them undoes any HTML escape sequences.
lemming’s picture

I retract some of point #2, I've seen some suggestions where the call to decode HTML occurs before the 2nd encoding call, which should handle these cases correctly.

lamp5’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)

Closing this because is outdated. Only 7.2 branch and greater are supported.