wp_specialchars()WP 1.0

Deprecated from version 2.8.0. It is no longer supported and can be removed in future releases. Use esc_html() instead.

Legacy escaping for HTML blocks.

No Hooks.

Return

String. Escaped $text.

Usage

wp_specialchars( $text, $quote_style, $charset, $double_encode );
$text(string) (required)
Text to escape.
$quote_style(string)
Unused.
Default: ENT_NOQUOTES
$charset(false|string)
Unused.
Default: false
$double_encode(false)
Whether to double encode. Unused.
Default: false

Notes

Changelog

Deprecated Since 2.8.0 Use esc_html()

Code of wp_specialchars() WP 6.0

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 );
	}
}