1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-23 17:33:50 +03:00

xinclude: Load included documents with XML_PARSE_DTDLOAD

We must detect ID attributes declared in external DTDs.

Regressed in 12f0bb94.
This commit is contained in:
Nick Wellnhofer 2024-06-17 12:54:46 +02:00
parent 3aca5bcfc3
commit 1ff484339e

View File

@ -341,7 +341,11 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
xmlDictReference(pctxt->dict);
}
xmlCtxtUseOptions(pctxt, ctxt->parseFlags);
/*
* We set DTDLOAD to make sure that ID attributes declared in
* external DTDs are detected.
*/
xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
inputStream = xmlLoadResource(pctxt, URL, NULL, XML_RESOURCE_XINCLUDE);
if (inputStream == NULL)