Use DOMDocument with ob_start breaks my HTML code

Use DOMDocument with ob_start breaks my HTML code