function FieldFilteredMarkup::allowedTags

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FieldFilteredMarkup.php \Drupal\Core\Field\FieldFilteredMarkup::allowedTags()
  2. 8.9.x core/lib/Drupal/Core/Field/FieldFilteredMarkup.php \Drupal\Core\Field\FieldFilteredMarkup::allowedTags()
  3. 10 core/lib/Drupal/Core/Field/FieldFilteredMarkup.php \Drupal\Core\Field\FieldFilteredMarkup::allowedTags()

Returns the allowed tag list.

Return value

string[] A list of allowed tags.

4 calls to FieldFilteredMarkup::allowedTags()
FieldFilteredMarkup::create in core/lib/Drupal/Core/Field/FieldFilteredMarkup.php
Overrides \Drupal\Component\Render\MarkupTrait::create().
FieldFilteredMarkup::displayAllowedTags in core/lib/Drupal/Core/Field/FieldFilteredMarkup.php
Returns a human-readable list of allowed tags for display in help texts.
OptionsDefaultFormatter::viewElements in core/modules/options/src/Plugin/Field/FieldFormatter/OptionsDefaultFormatter.php
Builds a renderable array for a field value.
OptionsKeyFormatter::viewElements in core/modules/options/src/Plugin/Field/FieldFormatter/OptionsKeyFormatter.php
Builds a renderable array for a field value.

File

core/lib/Drupal/Core/Field/FieldFilteredMarkup.php, line 58

Class

FieldFilteredMarkup
Defines an object that passes safe strings through the Field system.

Namespace

Drupal\Core\Field

Code

public static function allowedTags() {
    return [
        'a',
        'b',
        'big',
        'code',
        'del',
        'em',
        'i',
        'ins',
        'pre',
        'q',
        'small',
        'span',
        'strong',
        'sub',
        'sup',
        'tt',
        'ol',
        'ul',
        'li',
        'p',
        'br',
        'img',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.