protected function OptionsSelectWidget::sanitizeLabel in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget::sanitizeLabel()
Sanitizes a string label to display as an option.
Parameters
string $label: The label to sanitize.
Overrides OptionsWidgetBase::sanitizeLabel
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ OptionsSelectWidget.php, line 51 - Contains \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget.
Class
- OptionsSelectWidget
- Plugin implementation of the 'options_select' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
protected function sanitizeLabel(&$label) {
// Select form inputs allow unencoded HTML entities, but no HTML tags.
$label = Html::decodeEntities(strip_tags($label));
}