class WebformXss in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Utility/WebformXss.php \Drupal\webform\Utility\WebformXss
Provides webform helper to filter for cross-site scripting.
Hierarchy
- class \Drupal\webform\Utility\WebformXss
Expanded class hierarchy of WebformXss
3 files declare their use of WebformXss
- WebformComputedBase.php in src/
Element/ WebformComputedBase.php - WebformHtmlEditor.php in src/
Element/ WebformHtmlEditor.php - WebformTwigExtension.php in src/
Twig/ WebformTwigExtension.php
File
- src/
Utility/ WebformXss.php, line 10
Namespace
Drupal\webform\UtilityView source
class WebformXss {
/**
* Gets the list of HTML tags allowed by Xss::filterAdmin() with missing <label>, <fieldset>, <legend>, <font> tags.
*
* @return array
* The list of HTML tags allowed by filterAdmin() with missing
* <label>, <fieldset>, <legend>, <font> tags.
*/
public static function getAdminTagList() {
$allowed_tags = Xss::getAdminTagList();
$allowed_tags[] = 'label';
$allowed_tags[] = 'fieldset';
$allowed_tags[] = 'legend';
$allowed_tags[] = 'font';
return $allowed_tags;
}
/**
* Gets the standard list of HTML tags allowed by Xss::filter() with missing <font> tag.
*
* @return array
* The list of HTML tags allowed by Xss::filter() with missing <font> tag.
*/
public static function getHtmlTagList() {
$allowed_tags = Xss::getHtmlTagList();
$allowed_tags[] = 'font';
return $allowed_tags;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformXss:: |
public static | function | Gets the list of HTML tags allowed by Xss::filterAdmin() with missing <label>, <fieldset>, <legend>, <font> tags. | |
WebformXss:: |
public static | function | Gets the standard list of HTML tags allowed by Xss::filter() with missing <font> tag. |