]> git.proxmox.com Git - pve-cluster.git/commitdiff
fix bug #686: Fix escaping of XML attributes in cluster.conf
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 20 Aug 2015 15:10:46 +0000 (17:10 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 22 Aug 2015 08:31:54 +0000 (10:31 +0200)
When the cluster config XML gets written we escape the following
characters in attributes: < > & "
As the XML standard states, we only have to escape the characters
" and ' in attributes. Whereas < > & have to be escaped in tags
only. This addresses bug #686

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/Cluster.pm

index 5a031cbfe48c16552018e5f48aef7b622c8b5779..78b38eda9819f4495790230a1b21cd6c05a50d30 100644 (file)
@@ -1429,9 +1429,6 @@ sub xml_escape_attrib {
 
     return '' if !defined($data);
 
-    $data =~ s/&/&amp;/sg;
-    $data =~ s/</&lt;/sg;
-    $data =~ s/>/&gt;/sg;
     $data =~ s/"/&quot;/sg;
 
     return $data;