Sanitization functions
Same name in other branches
- 7.x includes/common.inc \sanitization
Functions to sanitize values.
See https://www.drupal.org/writing-secure-code for information on writing secure code.
File
-
core/
includes/ common.inc, line 190
Functions
Title Sort descending | Deprecated | File name | Summary |
---|---|---|---|
check_markup | core/ |
Runs all the enabled filters on a piece of text. | |
check_url | Deprecated | core/ |
Strips dangerous protocols from a URI and encodes it for output to HTML. |
FormattableMarkup::placeholderFormat | core/ |
Replaces placeholders in a string with values. | |
format_string | Deprecated | core/ |
Formats a string for HTML display by replacing variable placeholders. |
Html::escape | core/ |
Escapes text by converting special characters to HTML entities. | |
ProcessedText::preRenderText | core/ |
Pre-render callback: Renders a processed text element into #markup. | |
StringTranslationTrait::t | core/ |
Translates a string to the current language or to a given language. | |
t | core/ |
Translates a string to the current language or to a given language. | |
TranslatableMarkup::__construct | core/ |
Constructs a new class instance. | |
TranslationInterface::translate | core/ |
Translates a string to the current language or to a given language. | |
Xss::filter | core/ |
Filters HTML to prevent cross-site-scripting (XSS) vulnerabilities. | |
Xss::filterAdmin | core/ |
Applies a very permissive XSS/HTML filter for admin-only use. |
Classes
Title Sort descending | File name | Summary |
---|---|---|
FormattableMarkup | core/ |
Formats a string for HTML display by replacing variable placeholders. |
HtmlEscapedText | core/ |
Escapes HTML syntax characters to HTML entities for display in markup. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.