esc_html

FUNCTION wp-includes\formatting.php (ligne 4667) github
Filters a string cleaned and escaped for output in JavaScript. Text passed to esc_js() is stripped of invalid or special characters, and properly slashed for output.

Paramètres

Entrée :
$text
Sortie :
@param string $safe_text The text after it has been escaped.
@param string $text      The text prior to being escaped.
@param string $text
@return string Escaped text.

Utilisation

// Utilisation de la fonction esc_html
$result = esc_html($text);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...