You are here

protected function SelectOtherWidget::sanitizeLabel in CCK Select Other 8

Sanitizes a string label to display as an option.

Parameters

string $label: The label to sanitize.

Overrides OptionsWidgetBase::sanitizeLabel

File

src/Plugin/Field/FieldWidget/SelectOtherWidget.php, line 160

Class

SelectOtherWidget
Plugin implementation of the 'cck_select_other' widget.

Namespace

Drupal\cck_select_other\Plugin\Field\FieldWidget

Code

protected function sanitizeLabel(&$label) {

  // Select form inputs allow unencoded HTML entities, but no HTML tags.
  $label = strip_tags($label);
}