http://www.perlmonks.org?node_id=935291


in reply to Re^5: Thanks to Ikegami, Chromatic & Corion
in thread Thanks to Ikegami, Chromatic & Corion

I'm going to add that sub escape in the parser right now

The point of escape is to prevent aXML from processing that which is passed to the function. It is used by plugins, not aXML. aXML performs the *reverse* operation after the template has been fully processed.

my %escapes = ( '&lab;' => '<', '&rab;' => '>', '&lcb;' => '(', '&rcb;' => ')', '&lsb;' => '[', '&rsb;' => ']', ); sub final_processing { my ($content) = @_; $content =~ s{ (?: (&[lr][acs]b;) | <special...>(...)</special> | <post_include...>(...)</post_include> ) }{ if (defined($1)) { $escapes{$1} } elsif (defined($2)) { '&'.$2.';' } else { ... } }xeg; return $content; }