Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. OptionsSelectWidget.php

function OptionsSelectWidget::sanitizeLabel

Overrides OptionsWidgetBase::sanitizeLabel

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php, line 47

Class

OptionsSelectWidget
Plugin implementation of the 'options_select' widget.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

protected function sanitizeLabel(&$label) {
    // Select form inputs allow unencoded HTML entities, but no HTML tags.
    $label = Html::decodeEntities(strip_tags($label));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal