X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fdiogenes.text.inc.php;h=76ef7d96e835eebf8eca875973d23e026efb5788;hb=a32991269b5d06d2af6aca463da1f90dc2f12799;hp=7f415d6434b43d5b26bd86e0fa07a2596bb31dd9;hpb=af6ed63f9e3dd353bef708ca36d5efffa669199a;p=diogenes.git diff --git a/include/diogenes.text.inc.php b/include/diogenes.text.inc.php index 7f415d6..76ef7d9 100644 --- a/include/diogenes.text.inc.php +++ b/include/diogenes.text.inc.php @@ -78,7 +78,7 @@ function textUnprotectTags($prot_open, $prot_close, $input) */ function htmlProtectFromTextism($input) { - return textProtectTag("]*>", "<\/table>", "{NOP:", ":NOP}", $input); + return textProtectTag("", "<\/protect>", "{NOP:", ":NOP}", $input); } @@ -86,7 +86,9 @@ function htmlProtectFromTextism($input) */ function htmlUnprotectFromTextism($input) { - return textUnprotectTags("{NOP:", ":NOP}", $input); + $input = textUnprotectTags("

\s*{NOP:", ":NOP}\s*<\/p>", $input); + $input = textUnprotectTags("{NOP:", ":NOP}", $input); + return preg_replace('/<\/?protect>/', "", $input); }