wp_kses_html_error
Handles parsing errors in wp_kses_hair().
Description
(string) wp_kses_html_error( (string) $string );
The general plan is to remove everything to and including some whitespace, but it deals with quotes and apostrophes as well.
Returns (string)
Parameters (1)
- 0. $string (string)
- The string.
Usage
if ( !function_exists( 'wp_kses_html_error' ) ) { require_once ABSPATH . WPINC . '/kses.php'; } // The string. $string = ''; // NOTICE! Understand what this does before running. $result = wp_kses_html_error($string);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/kses.php
- function wp_kses_html_error($string) {
- return preg_replace('/^("[^"]*("|$)|\'[^\']*(\'|$)|\S)*\s*/', '', $string);
- }