Legacy escaping for HTML blocks.
Description
See also
Parameters
$text
stringrequired- Text to escape.
$quote_style
stringoptional- Unused.
Default:
ENT_NOQUOTES
$charset
false|stringoptional- Unused.
Default:
false
$double_encode
falseoptional- Whether to double encode. Unused.
Default:
false
Source
function wp_specialchars( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
return _wp_specialchars( $text, $quote_style, $charset, $double_encode );
} else {
return esc_html( $text );
}
}
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.