From: Jakub Narebski Date: Fri, 11 Dec 2009 01:54:52 +0000 (+0100) Subject: t/tags.t: Test of automatic escaping of user data X-Git-Tag: v0.003~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc7d4cf04a89866bfc6fd8a3db588c52362c83c1;p=catagits%2FWeb-Simple.git t/tags.t: Test of automatic escaping of user data Test that user data passed to XML::Tags::to_xml_string is automatically escaped (to protect against cross-side scripting attacks), and that mechanism to turned automatic off escaping works. This test can also serve as example on how to turn off autoescaping of user data. Signed-off-by: Jakub Narebski --- diff --git a/t/tags.t b/t/tags.t index af792cb..6c5a5e5 100644 --- a/t/tags.t +++ b/t/tags.t @@ -31,12 +31,12 @@ use Test::More qw(no_plan); ; } -sub flaax { - use XML::Tags qw(woo); - my $data = "one&twofour"; - , $data, , - , \$data, ; -} + sub flaax { + use XML::Tags qw(woo); + my $data = "one&twofour"; + , $data, , + , \$data, ; + } sub globbery { ;