| @@ 24-26 (lines=3) @@ | ||
| 21 | * @return string |
|
| 22 | */ |
|
| 23 | function xml_entites_html($texte){ |
|
| 24 | if (!is_string($texte) OR !$texte |
|
| 25 | OR strpbrk($texte, "&\"'<>")==false |
|
| 26 | ) return $texte; |
|
| 27 | ||
| 28 | if (!function_exists('spip_htmlspecialchars')) |
|
| 29 | include_spip("inc/filtres_mini"); |
|
| @@ 395-397 (lines=3) @@ | ||
| 392 | * @return mixed|string |
|
| 393 | */ |
|
| 394 | function entites_html($texte, $tout=false, $quote=true) { |
|
| 395 | if (!is_string($texte) OR !$texte |
|
| 396 | OR strpbrk($texte, "&\"'<>")==false |
|
| 397 | ) return $texte; |
|
| 398 | include_spip('inc/texte'); |
|
| 399 | $flags = !defined('PHP_VERSION_ID') OR PHP_VERSION_ID < 50400 ? ENT_COMPAT : ENT_COMPAT|ENT_HTML401; |
|
| 400 | $texte = spip_htmlspecialchars(echappe_retour(echappe_html($texte, '', true), '', 'proteger_amp'), $quote?ENT_QUOTES:$flags); |
|