summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2008-01-22 17:19:28 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2008-01-22 17:19:28 +0000
commit154bfccf1565c1dddfea43574821cc98810871ac (patch)
tree1af39be826edfcf68a5c9a8d3be9a1c40c02584d /includes
parentc07ba2a8ff1edff57d1ee6101f7154f9c9dcf5a2 (diff)
downloadbrdo-154bfccf1565c1dddfea43574821cc98810871ac.tar.gz
brdo-154bfccf1565c1dddfea43574821cc98810871ac.tar.bz2
#212409 by theborg: avoid calling check_plain() twice on menu links
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index d4e727a28..86ac9ad54 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -468,7 +468,6 @@ function _menu_check_access(&$item, $map) {
*/
function _menu_item_localize(&$item, $map, $link_translate = FALSE) {
$callback = $item['title_callback'];
-
// If we are not doing link translation or if the title matches the
// link title of its router item, localize it.
if (!$link_translate || (!empty($item['title']) && ($item['title'] == $item['link_title']))) {
@@ -489,6 +488,10 @@ function _menu_item_localize(&$item, $map, $link_translate = FALSE) {
else {
$item['title'] = call_user_func_array($callback, menu_unserialize($item['title_arguments'], $map));
}
+ // Avoid calling check_plain again on l() function.
+ if ($callback == 'check_plain') {
+ $item['options']['html'] = TRUE;
+ }
}
}
elseif ($link_translate) {