mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-28 02:20:18 -04:00
xml-utils: Escape XML attribute values when serializing
This commit is contained in:
1 parent
7ecf90f1dd
commit
027cd64af0
1 file changed
+4
-1
@@ -165,9 +165,12 @@ flatpak_xml_to_string (FlatpakXml *node, GString *res)
|
||||
{
|
||||
for (i = 0; node->attribute_names[i] != NULL; i++)
|
||||
{
|
||||
g_autofree char *value = NULL;
|
||||
|
||||
value = g_markup_escape_text (node->attribute_values[i], -1);
|
||||
g_string_append_printf (res, " %s=\"%s\"",
|
||||
node->attribute_names[i],
|
||||
node->attribute_values[i]);
|
||||
value);
|
||||
}
|
||||
}
|
||||
if (node->first_child == NULL)
|
||||
|
||||
Reference in new issue
Block a user