1 2 3 4 5 6 7 8 9 10 11 12 13
| function decoder($body){
$body = utf8_decode($body);//Convertit une cha?ne ISO-8859-1 en UTF-8
$body = quoted_printable_decode($body);//Convertit une chaîne quoted-printable en chaîne 8 bits
$body = stripslashes($body);//Supprime les anti-slash d'une cha?ne
$body = trim($body);//Supprime les espaces (ou d'autres caract?res) en d?but et fin de cha?ne
$body = html_entity_decode($body);//Convertit toutes les entit?s HTML en caract?res normaux
$chaineError = array("a:link","a:visited");// Tableau caract?re interdits
$body = str_replace($chaineError,"null:link",$body);//Remplace toutes les occurrences dans une cha?ne
$body = str_replace("=","%",$body);//Remplace toutes les occurrences dans une cha?ne
$body = urldecode($body);//Remplace toutes les occurrences dans une cha?ne
$body = strip_tags($body);
return $body;
} |
Partager