diff --git a/ecrire/inc/texte.php b/ecrire/inc/texte.php index 7f8fd42972c15d9d8ae8d38797242ea5a1389868..42714f8731704c3f39e208b6a81e48bee555015a 100644 --- a/ecrire/inc/texte.php +++ b/ecrire/inc/texte.php @@ -569,9 +569,9 @@ function typo($letexte, $echapper=true) { $letexte = corriger_caracteres($letexte); // Proteger les caracteres typographiques a l'interieur des tags html - $protege = "!':;?~"; - $illegal = "\x1\x2\x3\x4\x5\x6"; - if (preg_match_all(",</?[a-z!][^<>]*[!':;\?~][^<>]*>,imsS", + $protege = "!':;?~%"; + $illegal = "\x1\x2\x3\x4\x5\x6\x7"; + if (preg_match_all(",</?[a-z!][^<>]*[!':;\?~%][^<>]*>,imsS", $letexte, $regs, PREG_SET_ORDER)) { foreach ($regs as $reg) { $insert = $reg[0]; @@ -1411,11 +1411,10 @@ function traiter_raccourcis($letexte) { $puce = definir_puce(); else $puce = ''; - // Proteger les caracteres actifs a l'interieur des tags html - $protege = "{}-"; - $illegal = "\x1\x2\x3"; - if (preg_match_all(",</?[a-z!][^<>]*[!':;\?~][^<>]*>,imsS", + $protege = "{}-_"; + $illegal = "\x1\x2\x3\x4"; + if (preg_match_all(",</?[a-z!][^<>]*[$protege][^<>]*>,imsS", $letexte, $regs, PREG_SET_ORDER)) { foreach ($regs as $reg) { $insert = $reg[0];