From a32991269b5d06d2af6aca463da1f90dc2f12799 Mon Sep 17 00:00:00 2001 From: Jeremy Laine Date: Fri, 7 Jul 2006 11:58:20 +0000 Subject: [PATCH] fix Textile protection / unprotection --- include/diogenes.text.inc.php | 6 ++++-- plugins/TextileMarkup.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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); } diff --git a/plugins/TextileMarkup.php b/plugins/TextileMarkup.php index e71ae2c..fa6123a 100644 --- a/plugins/TextileMarkup.php +++ b/plugins/TextileMarkup.php @@ -20,6 +20,7 @@ require_once 'Plugin/Filter.php'; require_once 'classTextile.php'; +require_once 'diogenes.text.inc.php'; /** The TextileMarkup plugin allows you to render Textile markup into XHTML. */ -- 2.1.4