Is there any way to prevent DOMDocument from nesting
tags? Here's an example:
$dom->loadHTML('<p>text1</p><p>text2</p>', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
Outputs:
<p>text1<p>text2</p></p>
Any advice? That seems really strange.