This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_specialchars/
This function is deprecated as of WordPress 2.8.0. Please use esc_html instead.
Converts a number of special characters into their HTML entities.
Differs from htmlspecialchars as existing HTML entities will not be encoded. Specifically changes: & to &, < to < and > to >.
$quotes can be set to 'single' to encode ' to ', 'double' to encode " to ", or '1' to do both. Default is 0 where no quotes are encoded.
<code style="color: #000000"><span style="color: #0000BB"><?php wp_specialchars</span><span style="color: #007700">( </span><span style="color: #0000BB">$text</span><span style="color: #007700">, </span><span style="color: #0000BB">$quotes </span><span style="color: #007700">) </span><span style="color: #0000BB">?></span></code>
Since: 1.2.2
wp_specialchars() is located in wp-includes/formatting.php.