X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FTextileMarkup.php;h=7b032e6519f12acbefaa4854ef2eebea72d5f816;hb=08f262b93f354f71fd65044f757209221155d0a6;hp=e692a1be207a745ec05ba7e820282639f2e358aa;hpb=0f9303fde9161de7ea1240ecd7e47200822b40fb;p=diogenes.git
diff --git a/plugins/TextileMarkup.php b/plugins/TextileMarkup.php
index e692a1b..7b032e6 100644
--- a/plugins/TextileMarkup.php
+++ b/plugins/TextileMarkup.php
@@ -20,6 +20,7 @@
require_once 'Plugin/Skel/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_Skel_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_Skel_Filter
function filter($input)
{
$textile = new Textile();
- return $textile->TextileThis($input);
+ $data = htmlProtectFromTextism($input);
+ $data = $textile->TextileThis($data);
+ return htmlUnprotectFromTextism($data);
}
}