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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 /var/lib/libvirt/qemu/snapshot/$VM/comment--bug.xml
> /var/lib/libvirt/qemu/snapshot/$VM/comment--bug.xml:4: parser error : Comment not terminated
> <!--
> WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES
>   virsh snapshot-edit $VM comment--bug
> $ /etc/init.d/libvirt-bin restart
> error : qemuDomainSnapshotLoad:367 : Failed to parse snapshot XML from file '/var/lib/libvirt/qemu/snapshot/$VM/comment--bug.xml'
> $ virsh snapshot-list ucs32-33787-performance
>  Name                 Creation Time             State
> ------------------------------------------------------------
> 
> Also applies to QEMU domains, where the name contains double-hyphens.

This no longer reproduces with current master, it has been fixed by either of:
commit 0b121614a2086a8e66ae1f004fe912ba7c1d8a75
Author:     Ján Tomko <jtomko@xxxxxxxxxx>
CommitDate: 2012-10-29 14:38:43 +0100

    xml: print uuids in the warning

commit 9b704ab8235af010b1fda4886201aab02098b969
Author:     Ján Tomko <jtomko@xxxxxxxxxx>
CommitDate: 2012-10-23 14:24:31 +0200

    xml: omit domain name from comment if it contains double hyphen

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]