[Jifty-commit] r3898 - Template-Declare/lib/Template/Declare
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Aug 14 03:03:11 EDT 2007
Author: agentz
Date: Tue Aug 14 03:03:11 2007
New Revision: 3898
Modified:
Template-Declare/lib/Template/Declare/Tags.pm
Log:
TD - introduced ::Declare::Tags::SKIP_XML_ESCAPING.
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Tue Aug 14 03:03:11 2007
@@ -26,6 +26,8 @@
our $TAG_NEST_DEPTH = 0;
our @TEMPLATE_STACK;
+our $SKIP_XML_ESCAPING = 0;
+
sub import {
### caller: caller(0)
### @_
@@ -767,14 +769,16 @@
my $val = shift;
my $skip_postprocess = shift;
- no warnings 'uninitialized';
- $val =~ s/&/&/g;
- $val =~ s/</</g;
- $val =~ s/>/>/g;
- $val =~ s/\(/(/g;
- $val =~ s/\)/)/g;
- $val =~ s/"/"/g;
- $val =~ s/'/'/g;
+ if ( ! $SKIP_XML_ESCAPING ) {
+ no warnings 'uninitialized';
+ $val =~ s/&/&/g;
+ $val =~ s/</</g;
+ $val =~ s/>/>/g;
+ $val =~ s/\(/(/g;
+ $val =~ s/\)/)/g;
+ $val =~ s/"/"/g;
+ $val =~ s/'/'/g;
+ }
$val = Template::Declare->postprocessor->($val)
if defined($val) && !$skip_postprocess;
@@ -811,6 +815,11 @@
Contains the names of the tag subroutines generated
from certain tag set.
+=item C<< $Template::Declare::Tags::SKIP_XML_ESCAPING >>
+
+Makes L<Template::Declare> skip the XML escaping
+postprocessing entirely.
+
=back
=head1 SEE ALSO
More information about the Jifty-commit
mailing list