1. Laurence Rowe
  2. nginx-xslt-html-parser


Laurence Rowe  committed 28a1437

Set parser options with xmlCtxtUseOptions

In the current version of libxml2, loadsubset is a bit field. The
previous value of 1 does not match any of the loadsubset bit field
from reading the source, XML_DETECT_IDS is not tested for directly in
any relevant files, with SAX2.c using the test (ctxt->loadsubset !=
0). The loadsubset value is set to XML_DETECT_IDS by the
xmlCtxtUseOptions call with XML_PARSE_DTDLOAD.

  • Participants
  • Parent commits aed89f1
  • Branches default

Comments (0)

Files changed (1)

File src/http/modules/ngx_http_xslt_filter_module.c

View file
                           "xmlCreatePushParserCtxt() failed");
             return NGX_ERROR;
+        xmlCtxtUseOptions(ctxt, XML_PARSE_NOENT|XML_PARSE_DTDLOAD
+                                               |XML_PARSE_NOWARNING);
         ctxt->sax->externalSubset = ngx_http_xslt_sax_external_subset;
         ctxt->sax->setDocumentLocator = NULL;
-        ctxt->sax->warning = NULL;
         ctxt->sax->error = ngx_http_xslt_sax_error;
         ctxt->sax->fatalError = ngx_http_xslt_sax_error;
         ctxt->sax->_private = ctx;
-        ctxt->replaceEntities = 1;
-        ctxt->loadsubset = 1;
         ctx->ctxt = ctxt;
         ctx->request = r;