File: quote_xml_version.patch

package info (click to toggle)
libxml-sax-writer-perl 0.50-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 144 kB
  • ctags: 66
  • sloc: perl: 494; makefile: 42
file content (23 lines) | stat: -rw-r--r-- 859 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Author: Florian Ragwitz <rafl@debian.org>
Description: use double quotes in xml declarations
--- libxml-sax-writer-perl.orig/lib/XML/SAX/Writer/XML.pm
+++ libxml-sax-writer-perl/lib/XML/SAX/Writer/XML.pm
@@ -481,14 +481,14 @@
     # 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