From: Jakub Narebski Date: Wed, 16 Dec 2009 10:57:27 +0000 (+0100) Subject: Fix escaping of '"' in XML::Tags::to_xml_string X-Git-Tag: v0.003~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=213f0aaf607d0a2192ff8c4f1be1d0ef78e4ebb5;hp=be64ff24114973ab4be59e5b91296f6816b6e14a;p=catagits%2FWeb-Simple.git Fix escaping of '"' in XML::Tags::to_xml_string Double quote ('"') should be escaped as '"', not as '"'. This fixes a bug found in 'Escaping ok' test in t/tags.t Signed-off-by: Jakub Narebski --- diff --git a/lib/XML/Tags.pm b/lib/XML/Tags.pm index 0c9ff8b..9249691 100644 --- a/lib/XML/Tags.pm +++ b/lib/XML/Tags.pm @@ -26,7 +26,7 @@ sub to_xml_string { ref($_) ? (ref $_ eq 'SCALAR' ? $$_ : $_) : do { local $_ = $_; # copy - s/&/&/g; s/"/"/g; s//>/g; $_; + s/&/&/g; s/"/"/g; s//>/g; $_; } } @_ }