From f295f15c6f64836f8a2a00ffa20d9c447a64040f Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 23 Sep 2014 08:05:45 -0400 Subject: [PATCH] Fixes #5143: yii\bootstrap\ActiveField::label() should not encode label if it is explicitly specified. [skip ci] --- ActiveField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ActiveField.php b/ActiveField.php index 6c026c0..f24d775 100644 --- a/ActiveField.php +++ b/ActiveField.php @@ -373,11 +373,11 @@ class ActiveField extends \yii\widgets\ActiveField unset($options['label']); } else { $attribute = Html::getAttributeName($this->attribute); - $label = $this->model->getAttributeLabel($attribute); + $label = Html::encode($this->model->getAttributeLabel($attribute)); } } $this->parts['{beginLabel}'] = Html::beginTag('label', $options); $this->parts['{endLabel}'] = Html::endTag('label'); - $this->parts['{labelTitle}'] = Html::encode($label); + $this->parts['{labelTitle}'] = $label; } }