function FieldFilteredMarkup::allowedTags
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldFilteredMarkup.php \Drupal\Core\Field\FieldFilteredMarkup::allowedTags()
- 10 core/lib/Drupal/Core/Field/FieldFilteredMarkup.php \Drupal\Core\Field\FieldFilteredMarkup::allowedTags()
- 11.x 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.
6 calls to FieldFilteredMarkup::allowedTags()
- AllowedTagsXssTrait::allowedTags in core/
lib/ Drupal/ Core/ Field/ AllowedTagsXssTrait.php - Returns a list of tags allowed by AllowedTagsXssTrait::fieldFilterXss().
- AllowedTagsXssTraitDeprecateTest::testDeprecation in core/
tests/ Drupal/ Tests/ Core/ Field/ AllowedTagsXssTraitDeprecateTest.php - @expectedDeprecation Drupal\Core\Field\AllowedTagsXssTrait::fieldFilterXss is deprecated in drupal:8.0.0 and is removed in drupal:9.0.0. Use \Drupal\Core\Field\FieldFilteredMarkup::create() instead. @expectedDeprecation…
- 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.
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\FieldCode
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.