Add the copy of type from source xmlDoc in xmlCopyDoc()
Dear,
A bug related to php DOMDocument : https://bugs.php.net/bug.php?id=80665
When copy/clone an html document, the xmlDoc->type goes from XML_HTML_DOCUMENT_NODE to XML_DOCUMENT_NODE.
The specification say : "Returns a duplicate of this node" https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-3A0ED0A4
Kind regards, Serge