I found this to work perfectly when added to your (sub-)theme's template.php
, with YOURTHEMENAME
replaced by your (sub-)theme's name:
function YOURTHEMENAME_link($variables) {
$variables['options']['html'] = TRUE;
return '<a href="' . check_plain(url($variables['path'], $variables['options'])) . '"' . drupal_attributes($variables['options']['attributes']) . '>' . ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) . '</a>';
}
It is an override of the theme_link()
function defined in drupal/includes/theme.inc
; only the $variables['options']['html'] = TRUE;
line was added.
Source: https://www.drupal.org/node/112352#comment-5890386
$output = str_replace('<br>', '<br>', $output);
line to the function api.drupal.org/api/drupal/includes!menu.inc/function/… and it worked