# HG changeset patch # User Maxim Dounin # Date 1332899809 0 # Node ID 1a11e4a8877a7d8f3e68fa90a5ab2955bd7c89b2 # Parent 62d8db8c7157e376e81364774dd831e2d51edd27 Xslt: parser options now set with xmlCtxtUseOptions(). Note that "ctxt->loadsubset = 1" previously used isn't really correct as ctxt->loadsubset is a bitfield now. The use of xmlCtxtUseOptions() with XML_PARSE_DTDLOAD is believed to be a better way to do the same thing. Patch by Laurence Rowe. diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c --- a/src/http/modules/ngx_http_xslt_filter_module.c +++ b/src/http/modules/ngx_http_xslt_filter_module.c @@ -362,15 +362,14 @@ ngx_http_xslt_add_chunk(ngx_http_request "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;