From 30ed3ad7605ddb50a3964561de6dc872b55b7d1b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Sun, 27 Sep 2015 14:16:36 +0200 Subject: [PATCH] Fix badge markup in the BadgeMenuItemRenderer refs #5543 --- library/Icinga/Web/Menu/BadgeMenuItemRenderer.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Web/Menu/BadgeMenuItemRenderer.php b/library/Icinga/Web/Menu/BadgeMenuItemRenderer.php index ebde0b38f..07792856d 100644 --- a/library/Icinga/Web/Menu/BadgeMenuItemRenderer.php +++ b/library/Icinga/Web/Menu/BadgeMenuItemRenderer.php @@ -42,7 +42,7 @@ abstract class BadgeMenuItemRenderer extends MenuItemRenderer */ public function render(Menu $menu) { - return $this->renderBadge() . $this->createLink($menu); + return '
' . $this->renderBadge() . $this->createLink($menu) . '
'; } /** @@ -53,10 +53,11 @@ abstract class BadgeMenuItemRenderer extends MenuItemRenderer protected function renderBadge() { if ($count = $this->getCount()) { + $view = $this->getView(); return sprintf( - '
%s
', - $this->getView()->escape($this->getTitle()), - $this->getView()->escape($this->getState()), + '%s', + $view->escape($this->getTitle()), + $view->escape($this->getState()), $count ); }