esc_html
Description
Escapes plain text that will be placed between HTML tags.
Usage
Parameters
$string (string) (required) Html element to escape.
Return Value
(string) Escaped HTML output.
Example
Markup in the value is displayed as text rather than interpreted by the browser:
$title = '<strong>Account</strong>';
echo '<h1>' . esc_html(string: $title) . '</h1>';
// <h1><strong>Account</strong></h1>
Use purify_html() instead when selected rich-text markup should remain functional.