rev 1317 - trunk/mariachi/lib/Template/Plugin

[prev] [thread] [next] [lurker] [Date index for 2003/08/12]

From: richardc
Subject: rev 1317 - trunk/mariachi/lib/Template/Plugin
Date: 12:48 on 12 Aug 2003
Author: richardc
Date: 2003-08-12 12:47:59 +0100 (Tue, 12 Aug 2003)
New Revision: 1317

Modified:
   trunk/mariachi/lib/Template/Plugin/Mariachi.pm
Log:
entity escape ><


Modified: trunk/mariachi/lib/Template/Plugin/Mariachi.pm
===================================================================
--- trunk/mariachi/lib/Template/Plugin/Mariachi.pm	2003-08-12 11:47:04 UTC (rev 1316)
+++ trunk/mariachi/lib/Template/Plugin/Mariachi.pm	2003-08-12 11:47:59 UTC (rev 1317)
@@ -80,6 +80,13 @@
     my ($self, $text, @args) = @_;
     my $config = (ref $args[-1] eq 'HASH')? pop @args : {};
 
+
+    # XXX kludge
+    if ($self->_should_do('entity', $config)) {
+        $text =~ s/</&lt;/g;
+        $text =~ s/>/&gt;/g;
+    }
+
     if ($self->_should_do('email', $config)) {
         find_emails($text, \&munge_email);
     }

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52