[Pkg-libvirt-commits] [libguestfs] 142/384: v2v: DOM: Fix quoting of XML comments.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:56:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit c5e11785afd03bc3d9f9f23ab4590e4a08ede9d2
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Dec 24 16:51:15 2014 +0000

    v2v: DOM: Fix quoting of XML comments.
    
    We need to quote at least & and > in XML comments.
---
 v2v/DOM.ml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/v2v/DOM.ml b/v2v/DOM.ml
index d1541f1..cb65c1e 100644
--- a/v2v/DOM.ml
+++ b/v2v/DOM.ml
@@ -48,7 +48,9 @@ let e name attrs children =
  *)
 let rec node_to_chan ?(indent = 0) chan = function
   | PCData str -> output_string chan (xml_quote_pcdata str)
-  | Comment str -> output_spaces chan indent; fprintf chan "<!-- %s -->" str
+  | Comment str ->
+    output_spaces chan indent;
+    fprintf chan "<!-- %s -->" (xml_quote_pcdata str)
   | Element e -> element_to_chan ~indent chan e
 and element_to_chan ?(indent = 0) chan
     { e_name = name; e_attrs = attrs; e_children = children } =

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list