protected function OptionsWidgetBase::sanitizeLabel in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase::sanitizeLabel()
Sanitizes a string label to display as an option.
Parameters
string $label: The label to sanitize.
1 method overrides OptionsWidgetBase::sanitizeLabel()
- OptionsSelectWidget::sanitizeLabel in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ OptionsSelectWidget.php - Sanitizes a string label to display as an option.
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ OptionsWidgetBase.php, line 192 - Contains \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase.
Class
- OptionsWidgetBase
- Base class for the 'options_*' widgets.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
protected function sanitizeLabel(&$label) {
// Allow a limited set of HTML tags.
$label = FieldFilteredMarkup::create($label);
}