1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Subject: use double quotes in xml declarations
Author: Florian Ragwitz <rafl@debian.org>
Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=93623
Last-Update: 2010-08-22
--- a/lib/XML/SAX/Writer/XML.pm
+++ b/lib/XML/SAX/Writer/XML.pm
@@ -479,14 +479,14 @@ sub xml_decl {
# also, there's order in the pseudo-attr
my $xd = '';
if ($data->{Version}) {
- $xd .= "<?xml version='$data->{Version}'";
+ $xd .= "<?xml version=\"$data->{Version}\"";
if ($data->{Encoding}) {
- $xd .= " encoding='$data->{Encoding}'";
+ $xd .= " encoding=\"$data->{Encoding}\"";
}
if ($data->{Standalone}) {
- $xd .= " standalone='$data->{Standalone}'";
+ $xd .= " standalone=\"$data->{Standalone}\"";
}
- $xd .= '?>';
+ $xd .= "?>\n";
}
#$xd = $self->{Encoder}->convert($xd); # this may blow up
|