X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FTextileMarkup.php;h=251cd6d4055869d25a560cee41f14d9cc98f98de;hb=HEAD;hp=29f700dcd1b233197007fe569ab96331b0a90aad;hpb=6855525e48fad5de270500a5445c4f4ff85d8bda;p=diogenes.git diff --git a/plugins/TextileMarkup.php b/plugins/TextileMarkup.php index 29f700d..251cd6d 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. */ @@ -29,7 +30,7 @@ class TextileMarkup extends Diogenes_Plugin_Filter var $name = "TextileMarkup"; /** Plugin description */ - var $description = "This plugin allows you to render Textile markup into XHTML. To get started, take a look at some sample Textile markup pages."; + var $description = "This plugin allows you to render Textile markup into XHTML. To get started, take a look at some sample Textile markup pages. You can protect HTML code from this plugin by enclosing it between <protect> and </protect> tags."; /** Is the plugin allowed with respect to a given write permission on a page ? @@ -49,7 +50,9 @@ class TextileMarkup extends Diogenes_Plugin_Filter function filter($input) { $textile = new Textile(); - return $textile->TextileThis($input); + $data = htmlProtectFromTextism($input); + $data = $textile->TextileThis($data); + return htmlUnprotectFromTextism($data); } }