From f9640d5fad5426fbecf8d468a97bbf7ee90fd256 Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Wed, 24 Sep 2003 12:56:37 +0000 Subject: [PATCH] fix preserveWhiteSpace on document load --- ext/dom/document.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/dom/document.c b/ext/dom/document.c index 7f4d768356..35b08074a0 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -26,6 +26,7 @@ #include "php.h" #if HAVE_LIBXML && HAVE_DOM #include "php_dom.h" +#include typedef struct _idsIterator idsIterator; struct _idsIterator { @@ -1270,8 +1271,12 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source TSRMLS_DC) ctxt->vctxt.error = php_dom_ctx_error; ctxt->vctxt.warning = php_dom_ctx_error; + if (ctxt->sax != NULL) { ctxt->sax->error = php_dom_ctx_error; + if (ctxt->keepBlanks == 0) { + ctxt->sax->ignorableWhitespace = ignorableWhitespace; + } } xmlParseDocument(ctxt); -- 2.50.1