X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fdiogenes.text.inc.php;h=76ef7d96e835eebf8eca875973d23e026efb5788;hb=b6f4f41f928bef67ebb1e77b3a2ee05dc7ae2754;hp=7f415d6434b43d5b26bd86e0fa07a2596bb31dd9;hpb=e2e369d67aae533cf6e53a5e535807f70dde825f;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); }