When working with (malformed) HTML, you're probably better off using DOMDocument's saveHTML() method instead. C14N() will attempt to make your HTML valid XML, for example by converting <br> to <br></br>.So instead of:$html = $Node->C14N();Use:$html = $Node->ownerDocument->saveHTML( $Node );