Browse Source

Fixes #5143: yii\bootstrap\ActiveField::label() should not encode label if it is explicitly specified. [skip ci]

tags/2.0.0-rc
Qiang Xue 10 years ago
parent
commit
f295f15c6f
  1. 4
      ActiveField.php

4
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;
}
}

Loading…
Cancel
Save