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
