Sanitizes a string label to display as an option.
Parameters
string $label:
The label to sanitize.
File
- drupal/core/modules/options/lib/Drupal/options/Plugin/field/widget/OptionsWidgetBase.php, line 212
- Contains \Drupal\options\Plugin\field\widget\OptionsWidgetBase.
Class
- OptionsWidgetBase
- Base class for the 'options_*' widgets.
Namespace
Drupal\options\Plugin\field\widget
Code
protected static function sanitizeLabel(&$label) {
$label = field_filter_xss($label);
}