wp_kses_html_error()WP 1.0.0

Handles parsing errors in wp_kses_hair().

The general plan is to remove everything to and including some whitespace, but it deals with quotes and apostrophes as well.

No Hooks.

Return

String.

Usage

wp_kses_html_error( $attr );
$attr(string) (required)
-

Changelog

Since 1.0.0 Introduced.

wp_kses_html_error() code WP 6.5.2

function wp_kses_html_error( $attr ) {
	return preg_replace( '/^("[^"]*("|$)|\'[^\']*(\'|$)|\S)*\s*/', '', $attr );
}