mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
587663 Incorrect Attribute-Value Normalization
* parser.c: when replacing entities and that the entity is CDATA and reference entities then white space character in replacement text need to be replaced by 0x20 * result/noent/att10: correct the output of the associated regression test
This commit is contained in:
parent
eeb9932990
commit
283d50279d
7
parser.c
7
parser.c
@ -3705,7 +3705,12 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
|
||||
if (rep != NULL) {
|
||||
current = rep;
|
||||
while (*current != 0) { /* non input consuming */
|
||||
buf[len++] = *current++;
|
||||
if ((*current == 0xD) || (*current == 0xA) ||
|
||||
(*current == 0x9)) {
|
||||
buf[len++] = 0x20;
|
||||
current++;
|
||||
} else
|
||||
buf[len++] = *current++;
|
||||
if (len > buf_size - 10) {
|
||||
growBuffer(buf, 10);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
]>
|
||||
<doc>
|
||||
<tst a="xyz" b=" xyz"/>
|
||||
<tst a=" A B " b=" A B "/>
|
||||
<tst a="A B" b=" A B "/>
|
||||
<tst a=" A B " b=" A B "/>
|
||||
<tst a="x y" b=" x y "/>
|
||||
<tst a="a b" b=" a b "/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user