Such as <section>
. Is there anything I can do about this?
I've run into this issue with PHP's DOMDoc and XSL functions. You basically have to load the document as XML. Thats the only way I got the <video>
tag to work.
Update:
You can also try adding elements & entities to the <!DOCTYPE html5 >
as long as $doc->resolveExternals = true
.
I don't know if you've tried the library ultimately pointed to in this answer:
DOM parser that allows HTML5-style </ in <script> tag
Html5lib solved the same issue you're experiencing for me (it was the <aside>
and <nav>
tags triggering my issues)
I was using this to parse html fragments, and the advantage is that it was a drop-in replacement for DOMDocument, as currently it uses DOMDocument as the output object, so no other functionality was broken in my implementation.
There is a note in the documentation that they are looking to move away from DOMDocument in the future.
html5lib for PHP can be found here: http://code.google.com/p/html5lib/downloads/detail?name=html5lib-php-0.1.tar.gz&can=2&q=
In the answer linked to above, there are further details on usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With