From 7e06edd1914f159df12656d6d2754cb85a1b0d2e 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 --- Dropdown.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dropdown.php b/Dropdown.php index b170bc8..a69f752 100644 --- a/Dropdown.php +++ b/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';