Codex tools: Log in
Contents |
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.
<?php wp_specialchars( $text, $quotes ) ?>
Since: 1.2.2
wp_specialchars() is located in wp-includes/formatting.php.