summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-03-28 01:56:49 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-03-28 01:56:49 +0000
commit5d5c866beecb70fcb5a746f59bd0a4c810b09663 (patch)
tree87eddccd8ba9f0a7ee0f772eaa4bf988e1c7bb2a
parenta3bdd737e5c5feb3ef7b341fd9f84c5d83d3340b (diff)
downloadnginx-5d5c866beecb70fcb5a746f59bd0a4c810b09663.tar.gz
nginx-5d5c866beecb70fcb5a746f59bd0a4c810b09663.tar.bz2
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.
-rw-r--r--src/http/modules/ngx_http_xslt_filter_module.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
index 98fe774ce..4309a4489 100644
--- 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_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;