File: quote_xml_version.dpatch

package info (click to toggle)
libxml-sax-writer-perl 0.44-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 124 kB
  • ctags: 65
  • sloc: perl: 483; sh: 146; makefile: 54
file content (29 lines) | stat: -rw-r--r-- 1,008 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
24
25
26
27
28
29
#! /bin/sh /usr/share/dpatch/dpatch-run
## quote_xml_version.dpatch by Florian Ragwitz <rafl@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: use double quotes in xml declarations

@DPATCH@

--- libxml-sax-writer-perl-0.44.orig/lib/XML/SAX/Writer/XML.pm
+++ libxml-sax-writer-perl-0.44/lib/XML/SAX/Writer/XML.pm
@@ -476,14 +476,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