X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FTextileMarkup.php;h=7b032e6519f12acbefaa4854ef2eebea72d5f816;hb=824ae29017126c7420683e485d03fdc15ca4fab7;hp=29f700dcd1b233197007fe569ab96331b0a90aad;hpb=6855525e48fad5de270500a5445c4f4ff85d8bda;p=diogenes.git diff --git a/plugins/TextileMarkup.php b/plugins/TextileMarkup.php index 29f700d..7b032e6 100644 --- a/plugins/TextileMarkup.php +++ b/plugins/TextileMarkup.php @@ -18,18 +18,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -require_once 'Plugin/Filter.php'; +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. */ -class TextileMarkup extends Diogenes_Plugin_Filter +class TextileMarkup extends Diogenes_Plugin_Skel_Filter { /** Plugin name */ 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); } }