(yoarvi@gmail.com, Derick)
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
-
+- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
?? ??? 20??, PHP 5.3.2
- Upgraded bundled sqlite to version 3.6.22. (Ilia)
xmlDoc *docp;
dom_object *intern;
xmlChar *mem;
- int size;
+ int size, format;
+ dom_doc_propsptr doc_props;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
+#if LIBXML_VERSION >= 20623
+ doc_props = dom_get_doc_props(intern->document);
+ format = doc_props->formatoutput;
+ htmlDocDumpMemoryFormat(docp, &mem, &size, format);
+#else
htmlDocDumpMemory(docp, &mem, &size);
+#endif
if (!size) {
if (mem)
xmlFree(mem);
--- /dev/null
+--TEST--
+Bug #35673 (formatOutput does not work with saveHTML).
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$html = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>This is the title</title></head></html>';
+
+$htmldoc = new DOMDocument();
+$htmldoc->loadHTML($html);
+$htmldoc->formatOutput = true;
+echo $htmldoc->saveHTML();
+?>
+--EXPECT--
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>This is the title</title>
+</head></html>