mirror of
https://github.com/nginx/nginx.git
synced 2025-01-08 07:03:01 -06:00
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.
This commit is contained in:
parent
a3bdd737e5
commit
5d5c866bee
@ -362,15 +362,14 @@ ngx_http_xslt_add_chunk(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,
|
||||
"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;
|
||||
|
Loading…
Reference in New Issue
Block a user