[libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Philipp Hahn
To quote http://www.w3.org/TR/REC-xml/#sec-comments: For compatibility, the string -- (double-hyphen) must not occur within comments. For example this breaks creating snapshots: $ virsh snapshot-create-as $VM comment--bug $ xmllint --noout /var/lib/libvirt/qemu/snapshot/$VM/comment--bug.xml

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Ján Tomko
On 02/21/2014 10:01 AM, Philipp Hahn wrote: To quote http://www.w3.org/TR/REC-xml/#sec-comments: For compatibility, the string -- (double-hyphen) must not occur within comments. For example this breaks creating snapshots: $ virsh snapshot-create-as $VM comment--bug $ xmllint --noout

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Philipp Hahn
On 21.02.2014 12:18, Ján Tomko wrote: This no longer reproduces with current master, it has been fixed by either of: commit 0b121614a2086a8e66ae1f004fe912ba7c1d8a75 Author: Ján Tomko jto...@redhat.com CommitDate: 2012-10-29 14:38:43 +0100 xml: print uuids in the warning commit

Re: [libvirt] [PATCH] XML: Escape double-hyphens in XML comment

2014-02-21 Thread Eric Blake
On 02/21/2014 02:01 AM, Philipp Hahn wrote: To quote http://www.w3.org/TR/REC-xml/#sec-comments: For compatibility, the string -- (double-hyphen) must not occur within comments. +/* + * Break sequence of hyphens by inserting (arbitrarily chosen) backslashes. + *