WordPress at a glance
function is not described

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 $string.

Usage

wp_specialchars( $string, $quote_style, $charset, $double_encode );
$string(string) (required)
String to escape.
$quote_style(string)
Unused.
$charset(false|string)
Unused.
$double_encode(false)
Whether to double encode. Unused.

Notes

  • See: esc_html()

Changelog

Deprecated Since 2.8.0 Use esc_html()

Code of wp_specialchars() WP 5.7

<?php
function wp_specialchars( $string, $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( $string, $quote_style, $charset, $double_encode );
	} else {
		return esc_html( $string );
	}
}