Legacy escaping for HTML blocks.
Description
See also
Parameters
$textstringrequired- Text to escape.
$quote_stylestringoptional- Unused.
Default:
ENT_NOQUOTES $charsetfalse|stringoptional- Unused.
Default:
false $double_encodefalseoptional- 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.