SmartBreadcrumb Node adds a htmlspecialchars around the $node->title but this has already been done earlier in the chain causing & to really become &.

Comments

andrew m riley’s picture

StatusFileSize
new498 bytes

I wrote a patch about it. Like to see it? Well here it is.

To reproduce this problem:

1) disable the smart_breadcrumb_menu module
2) Create a node with "Test & blah" as the title
3) Create a child node (make the url be a child of the node in #2)
4) Navigate to the node created in #3.

divThis’s picture

I've applied the above patch with no issues. Patch is included in version 6.x-1.2.

divThis’s picture

Assigned: Unassigned » divThis
Status: Active » Closed (fixed)
tstackhouse’s picture

Version: 6.x-1.1 » 6.x-1.3
Status: Closed (fixed) » Active

I'm experiencing this behaviour in 1.3, using the exact circumstances described in #1.

tstackhouse’s picture

Status: Active » Needs review
StatusFileSize
new437 bytes

I figured out where this is happening, the issue stems from line 315 in menu_breadcrumb.inc in set_crumb()

$crumb = l($title['title'], $title['path'], $link_options);

l() runs the text through check_plain() which calls htmlspecialchars(). By this point, the '&' is already escaped and gets escaped again.

In addition, on line 95 in filter_titles() check_plain is called again:

$titles[$module]['title'] = check_plain($titles[$module]['title']);

I've attached a patch that should address this.

petermallett’s picture

Status: Needs review » Closed (fixed)

I've applied the above patch and included in version 6.x-1.4.