- ๐ณ๐ฟNew Zealand xurizaemon ลtepoti, Aotearoa ๐
Closing a lot of ancient (> 4 years) issues. It's fine to re-open if you think there's something of value to be discussed.
The Menu HTML module allows to add HTML to a menu item's name, which is usually used to display an icon next to the name, like this:
Menu link title <img src="/sites/mysite/files/myicon.png" />
When the "Append page title to breadcrumb" option is checked, the menu name will be determined by drupal_get_title(), which adds a check_plain() and thus destroys the angle brackets around HTML tags and a literal " character. Instead of the icon being displayed within the last piece of the breadcumb, the HTML source is displayed. To restore the image being displayed, menu_breadcrumb.module has to be changed as follows:
Change
if (variable_get('menu_breadcrumb_append_node_title', 0) == 1) {
if (variable_get('menu_breadcrumb_append_node_url', 0) == 1) {
$breadcrumb[] = l(drupal_get_title(), $_GET['q'], array('html' => TRUE));
}
else {
$breadcrumb[] = drupal_get_title();
}
}
(beginning on line 340) to
if (variable_get('menu_breadcrumb_append_node_title', 0) == 1) {
// drupal_get_title() adds check_plain() => angle brackets around HTML tags get lost => restore them
$node_title = drupal_get_title();
$node_title = preg_replace('/</', '<', $node_title);
$node_title = preg_replace('/>/', '>', $node_title);
$node_title = preg_replace('/"/', '"', $node_title);
if (variable_get('menu_breadcrumb_append_node_url', 0) == 1) {
$breadcrumb[] = l($node_title, $_GET['q'], array('html' => TRUE));
}
else {
$breadcrumb[] = $node_title;
}
}
Would you consider to commit this change? Thanks.
Closed: outdated
1.4
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Closing a lot of ancient (> 4 years) issues. It's fine to re-open if you think there's something of value to be discussed.