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()

wp_specialchars() code WP 6.4.3

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