On this page
wp_kses_html_error( string $string ): string
Handles parsing errors in wp_kses_hair().
Description
The general plan is to remove everything to and including some whitespace, but it deals with quotes and apostrophes as well.
Parameters
$stringstring Required
Return
string
Source
File: wp-includes/kses.php. View all references
function wp_kses_html_error( $string ) {
return preg_replace( '/^("[^"]*("|$)|\'[^\']*(\'|$)|\S)*\s*/', '', $string );
}
Related
Used By
| Used By | Description |
|---|---|
| wp_kses_hair() wp-includes/kses.php | Builds an attribute list from string containing attributes. |
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_kses_html_error