wp_pre_kses_less_than() WordPress Function
The wp_pre_kses_less_than() function is a pre-save filter used to remove the less than (<) character from the content before it is saved to the database. This is done to prevent accidental insertion of HTML code that could break the site.
wp_pre_kses_less_than( string $text ) #
Converts lone less than signs.
Description
KSES already converts lone greater than signs.
Parameters
- $text
(string)(Required)Text to be converted.
Return
(string) Converted text.
Source
File: wp-includes/formatting.php
function wp_pre_kses_less_than( $text ) { return preg_replace_callback( '%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |