mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixed bug #59981 related to handling of '&' in attributes when entities
* parser.c result/noent/wml.xml: fixed bug #59981 related to handling of '&' in attributes when entities are substitued Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Sep 11 11:25:36 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* parser.c result/noent/wml.xml: fixed bug #59981 related
|
||||||
|
to handling of '&' in attributes when entities are substitued
|
||||||
|
|
||||||
Mon Sep 10 22:14:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
Mon Sep 10 22:14:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libxml.h include/libxml/xmlversion.h.in
|
* libxml.h include/libxml/xmlversion.h.in
|
||||||
|
60
parser.c
60
parser.c
@ -2212,36 +2212,50 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
|
|||||||
(c != '<')) || (ctxt->token != 0)) {
|
(c != '<')) || (ctxt->token != 0)) {
|
||||||
if (c == 0) break;
|
if (c == 0) break;
|
||||||
if (ctxt->token == '&') {
|
if (ctxt->token == '&') {
|
||||||
/*
|
if (ctxt->replaceEntities) {
|
||||||
* The reparsing will be done in xmlStringGetNodeList()
|
if (len > buf_size - 10) {
|
||||||
* called by the attribute() function in SAX.c
|
growBuffer(buf);
|
||||||
*/
|
}
|
||||||
static xmlChar buffer[6] = "&";
|
buf[len++] = '&';
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* The reparsing will be done in xmlStringGetNodeList()
|
||||||
|
* called by the attribute() function in SAX.c
|
||||||
|
*/
|
||||||
|
static xmlChar buffer[6] = "&";
|
||||||
|
|
||||||
if (len > buf_size - 10) {
|
if (len > buf_size - 10) {
|
||||||
growBuffer(buf);
|
growBuffer(buf);
|
||||||
|
}
|
||||||
|
current = &buffer[0];
|
||||||
|
while (*current != 0) { /* non input consuming */
|
||||||
|
buf[len++] = *current++;
|
||||||
|
}
|
||||||
|
ctxt->token = 0;
|
||||||
}
|
}
|
||||||
current = &buffer[0];
|
|
||||||
while (*current != 0) { /* non input consuming */
|
|
||||||
buf[len++] = *current++;
|
|
||||||
}
|
|
||||||
ctxt->token = 0;
|
|
||||||
} else if (c == '&') {
|
} else if (c == '&') {
|
||||||
if (NXT(1) == '#') {
|
if (NXT(1) == '#') {
|
||||||
int val = xmlParseCharRef(ctxt);
|
int val = xmlParseCharRef(ctxt);
|
||||||
if (val == '&') {
|
if (val == '&') {
|
||||||
/*
|
if (ctxt->replaceEntities) {
|
||||||
* The reparsing will be done in xmlStringGetNodeList()
|
if (len > buf_size - 10) {
|
||||||
* called by the attribute() function in SAX.c
|
growBuffer(buf);
|
||||||
*/
|
}
|
||||||
static xmlChar buffer[6] = "&";
|
buf[len++] = '&';
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* The reparsing will be done in xmlStringGetNodeList()
|
||||||
|
* called by the attribute() function in SAX.c
|
||||||
|
*/
|
||||||
|
static xmlChar buffer[6] = "&";
|
||||||
|
|
||||||
if (len > buf_size - 10) {
|
if (len > buf_size - 10) {
|
||||||
growBuffer(buf);
|
growBuffer(buf);
|
||||||
}
|
}
|
||||||
current = &buffer[0];
|
current = &buffer[0];
|
||||||
while (*current != 0) { /* non input consuming */
|
while (*current != 0) { /* non input consuming */
|
||||||
buf[len++] = *current++;
|
buf[len++] = *current++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (len > buf_size - 10) {
|
if (len > buf_size - 10) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<wml>
|
<wml>
|
||||||
<card id="card1" title="Rubriques 75008">
|
<card id="card1" title="Rubriques 75008">
|
||||||
<p>
|
<p>
|
||||||
<a href="rubmenu.asp?CP=75008&#38;RB=01">Cinéma</a><br/>
|
<a href="rubmenu.asp?CP=75008&RB=01">Cinéma</a><br/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</card>
|
</card>
|
||||||
|
Reference in New Issue
Block a user