mirror of
https://gitea.psi.ch/ELOG/mxml.git
synced 2026-09-09 01:23:22 +00:00
Fixed wrong decoding of attribute names and values containg '&'
This commit is contained in:
parent
457fe775b5
commit
1704e5bf1c
2
mxml.c
2
mxml.c
@ -1415,6 +1415,7 @@ PMXML_NODE mxml_parse_buffer(const char *buf, char *error, int error_size)
|
|||||||
len = sizeof(attrib_name)-1;
|
len = sizeof(attrib_name)-1;
|
||||||
memcpy(attrib_name, p, len);
|
memcpy(attrib_name, p, len);
|
||||||
attrib_name[len] = 0;
|
attrib_name[len] = 0;
|
||||||
|
mxml_decode(attrib_name);
|
||||||
|
|
||||||
p = pv;
|
p = pv;
|
||||||
while (*p && isspace((unsigned char)*p)) {
|
while (*p && isspace((unsigned char)*p)) {
|
||||||
@ -1452,6 +1453,7 @@ PMXML_NODE mxml_parse_buffer(const char *buf, char *error, int error_size)
|
|||||||
len = sizeof(attrib_value)-1;
|
len = sizeof(attrib_value)-1;
|
||||||
memcpy(attrib_value, p, len);
|
memcpy(attrib_value, p, len);
|
||||||
attrib_value[len] = 0;
|
attrib_value[len] = 0;
|
||||||
|
mxml_decode(attrib_value);
|
||||||
|
|
||||||
/* add attribute to current node */
|
/* add attribute to current node */
|
||||||
mxml_add_attribute(pnew, attrib_name, attrib_value);
|
mxml_add_attribute(pnew, attrib_name, attrib_value);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user