Codex

Function Reference/esc html

Contents

Description

Escaping for HTML blocks.

Usage

<?php esc_html$text ?>

Parameters

$text
(string) (required) Text to escape
Default: None

Return Values

HTML (string) 
Escaped HTML string.

Examples

Notes

  • Uses the 'esc_html' filter.

Change Log

Source File

esc_html() is located in wp-includes/formatting.php.

Related

See the Data Validation article for an in-depth discussion of input and output sanitization.

See also index of Function Reference and index of Template Tags.