I receive an html string using curl:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$html_string = curl_exec($ch);
When I echo
it
I asume that you are using curl + str_get_html instead of simply using file_get_html with the URL because of the POST parameters you need to send.
You can use this W3C validator (http://validator.w3.org/#validate_by_input+with_options) to validate the returned HTML, then, once you are sure the result is a 100% valid HTML code you can report a bug here: http://sourceforge.net/p/simplehtmldom/bugs/.