1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

parser: Fix in-parameter-entity and in-external-dtd checks

Use in ctxt->input->entity instead of ctxt->inputNr to determine whether
we are inside a parameter entity.

Stop using ctxt->external to check whether we're in an external DTD.
This is signaled by ctxt->inSubset == 2.
This commit is contained in:
Nick Wellnhofer
2023-12-26 02:10:35 +01:00
parent 477a7ed82c
commit d944a41515
11 changed files with 66 additions and 110 deletions

View File

@@ -6277,7 +6277,6 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt)
ctxt->hasExternalSubset = 0;
ctxt->hasPErefs = 0;
ctxt->html = 1;
ctxt->external = 0;
ctxt->instate = XML_PARSER_START;
ctxt->token = 0;