protected static function Widget::sanitizeLabel in Select (or other) 8.3
Sanitizes a string label to display as an option.
Parameters
string $label: The label to sanitize.
Overrides SelectOrOtherWidgetBase::sanitizeLabel
File
- src/
Plugin/ Field/ FieldWidget/ Widget.php, line 177 - Contains \Drupal\select_or_other\Plugin\Field\FieldWidget\Widget.
Class
- Widget
- Plugin implementation of the 'select_or_other' widget.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
protected static function sanitizeLabel(&$label) {
// Select form inputs allow unencoded HTML entities, but no HTML tags.
$label = strip_tags($label);
}