X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FTextileMarkup.php;h=251cd6d4055869d25a560cee41f14d9cc98f98de;hb=7d7400eafcf18fddfd6df14b7d0a3a1700455ea7;hp=e692a1be207a745ec05ba7e820282639f2e358aa;hpb=0f9303fde9161de7ea1240ecd7e47200822b40fb;p=diogenes.git
diff --git a/plugins/TextileMarkup.php b/plugins/TextileMarkup.php
index e692a1b..251cd6d 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/Skel/Filter.php';
+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.
*/
-class TextileMarkup extends Diogenes_Plugin_Skel_Filter
+class TextileMarkup extends Diogenes_Plugin_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_Skel_Filter
function filter($input)
{
$textile = new Textile();
- return $textile->TextileThis($input);
+ $data = htmlProtectFromTextism($input);
+ $data = $textile->TextileThis($data);
+ return htmlUnprotectFromTextism($data);
}
}