wp_kses_html_error() – Handles parsing errors in `wp_kses_hair()`.

You appear to be a bot. Output may be restricted

Description

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.

Usage

$string = wp_kses_html_error( $attr );

Parameters

$attr
( string ) required

Returns

string

Source

File name: wordpress/wp-includes/kses.php


Lines:

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

 View on GitHub View on Trac