Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_xslt_filter_module.c @ 4560:1a11e4a8877a
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 28 Mar 2012 01:56:49 +0000 |
parents | 212a0251951b |
children | 959371df1806 |
comparison
equal
deleted
inserted
replaced
4559:62d8db8c7157 | 4560:1a11e4a8877a |
---|---|
360 if (ctxt == NULL) { | 360 if (ctxt == NULL) { |
361 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 361 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
362 "xmlCreatePushParserCtxt() failed"); | 362 "xmlCreatePushParserCtxt() failed"); |
363 return NGX_ERROR; | 363 return NGX_ERROR; |
364 } | 364 } |
365 xmlCtxtUseOptions(ctxt, XML_PARSE_NOENT|XML_PARSE_DTDLOAD | |
366 |XML_PARSE_NOWARNING); | |
365 | 367 |
366 ctxt->sax->externalSubset = ngx_http_xslt_sax_external_subset; | 368 ctxt->sax->externalSubset = ngx_http_xslt_sax_external_subset; |
367 ctxt->sax->setDocumentLocator = NULL; | 369 ctxt->sax->setDocumentLocator = NULL; |
368 ctxt->sax->warning = NULL; | |
369 ctxt->sax->error = ngx_http_xslt_sax_error; | 370 ctxt->sax->error = ngx_http_xslt_sax_error; |
370 ctxt->sax->fatalError = ngx_http_xslt_sax_error; | 371 ctxt->sax->fatalError = ngx_http_xslt_sax_error; |
371 ctxt->sax->_private = ctx; | 372 ctxt->sax->_private = ctx; |
372 ctxt->replaceEntities = 1; | |
373 ctxt->loadsubset = 1; | |
374 | 373 |
375 ctx->ctxt = ctxt; | 374 ctx->ctxt = ctxt; |
376 ctx->request = r; | 375 ctx->request = r; |
377 } | 376 } |
378 | 377 |