diff --git a/src/TwbBundle/View/Helper/TwbBundleDropdown.php b/src/TwbBundle/View/Helper/TwbBundleDropdown.php index 7fa423c..0103b9f 100644 --- a/src/TwbBundle/View/Helper/TwbBundleDropdown.php +++ b/src/TwbBundle/View/Helper/TwbBundleDropdown.php @@ -325,7 +325,19 @@ protected function renderItem($aItemOptions) $sAttributeString = $this->createAttributesString($aItemOptions['item_attributes']); $this->validTagAttributes = $aValidTagAttributes; - $sItemContent = sprintf(self::$dropdownItemFormats[self::TYPE_ITEM_LINK], $sAttributeString, $this->getEscapeHtmlHelper()->__invoke($aItemOptions['label'])); + $sLabel = ''; + + if (isset($aItemOptions['label_options']['disable_html_escaping']) && $aItemOptions['label_options']['disable_html_escaping']) { + $sLabel = $aItemOptions['label']; + } else { + $sLabel = $this->getEscapeHtmlHelper()->__invoke($aItemOptions['label']); + } + + $sItemContent = sprintf( + self::$dropdownItemFormats[self::TYPE_ITEM_LINK], + $sAttributeString, + $sLabel + ); break; }