From 0711027e0135d1020860d00faea2caeffb34d0a2 Mon Sep 17 00:00:00 2001 From: Alex-Code Date: Mon, 30 Jun 2014 11:24:31 +0100 Subject: [PATCH] Allow single items to set their encoding option --- extensions/bootstrap/Dropdown.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/bootstrap/Dropdown.php b/extensions/bootstrap/Dropdown.php index b170bc8171..a69f752fd6 100644 --- a/extensions/bootstrap/Dropdown.php +++ b/extensions/bootstrap/Dropdown.php @@ -80,7 +80,8 @@ class Dropdown extends Widget if (!isset($item['label'])) { throw new InvalidConfigException("The 'label' option is required."); } - $label = $this->encodeLabels ? Html::encode($item['label']) : $item['label']; + $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; + $label = $encodeLabel ? Html::encode($item['label']) : $item['label']; $options = ArrayHelper::getValue($item, 'options', []); $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []); $linkOptions['tabindex'] = '-1';