Fixed: Pretty-printed XML using prefixes not parsed correctly.

* eg `<a:x>   <y/></a:x>` could lead to errors, wheras (`<x>   <y/></x>`) works fine.
This commit is contained in:
Olof hagsand 2020-02-06 18:02:14 +01:00
parent a2b1674708
commit 61e03690ca
2 changed files with 15 additions and 5 deletions

View file

@ -335,10 +335,17 @@ xml_parse_bslash2(struct xml_parse_yacc_arg *ya,
while ((xc = xml_child_each(x, xc, CX_ELMNT)) != NULL)
break;
if (xc != NULL){ /* at least one element */
xc = NULL;
while ((xc = xml_child_each(x, xc, CX_BODY)) != NULL) {
xml_value_set(xc, ""); /* XXX remove */
}
int i;
for (i=0; i<xml_child_nr(x);){
xc = xml_child_i(x, i);
if (xml_type(xc) != CX_BODY){
i++;
continue;
}
if (xml_child_rm(x, i) < 0)
goto done;
xml_free(xc);
}
}
}
retval = 0;