Is it possible to have htmlpurifier use the html5 doctype?
The documentation here states that you can change the doctype and encoding with the following:
http://htmlpurifier.org/docs/enduser-customize.html
It still doesn't support HTML5 DOCTYPE but you can specify what tags you want to add using the guide above.