Stop the parsing oh HTML content on serious errors

In these cases, the HTML will stay unchanged (as a single leaf).  This
allows other tools to try to decode it.
Allow to specify the encoding for HTML parsing