Commit 3f0627a1 authored by David Kilzer's avatar David Kilzer Committed by Nick Wellnhofer
Browse files

Fix duplicate SAX callbacks for entity content

Reset 'was_checked' to prevent entity from being parsed twice and SAX
callbacks being invoked twice if XML_PARSE_NOENT was set.

This regressed in version 2.9.3 and caused problems with WebKit.

Fixes bug 760367.
parent 01a4b81a
......@@ -7418,6 +7418,9 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
}
if (ent->checked == 0)
ent->checked = 2;
/* Prevent entity from being parsed and expanded twice (Bug 760367). */
was_checked = 0;
} else if (ent->checked != 1) {
ctxt->nbentities += ent->checked / 2;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment