apply_filters( 'esc_xml', string $safe_text, string $text )
- Since
- 5.5.0
Filters a string cleaned and escaped for output in XML.
Description
Text passed to esc_xml() is stripped of invalid or special characters before output. HTML named character references are converted to their equivalent code points.
Compatibility
- WordPress
- since 5.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$safe_textstring- The text after it has been escaped.
$textstring- The text prior to being escaped.
Where this hook fires · 1
wp-includes/formatting.php:4806esc_xml()
Source code
* * @since 5.5.0 * * @param string $safe_text The text after it has been escaped. * @param string $text The text prior to being escaped. */ return apply_filters( 'esc_xml', $safe_text, $text );} /** * Escapes an HTML tag name. * * @since 2.5.0Changelog
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.