How can I get Hpricot to play nice with HTML5?

Posted by Adam Singer on Stack Overflow See other posts from Stack Overflow or by Adam Singer
Published on 2010-05-18T04:14:40Z Indexed on 2010/05/18 4:20 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

I am using Hpricot to parse a theme file. I have noticed, however, that if I feed a valid HTML5 document into Hpricot(), it auto-closes HTML5 tags (like <section>), and messes with the DOCTYPE.

Are there any extensions to Hpricot, or perhaps a flag I need to set, that will allow HTML5 documents to be parsed correctly?

© Stack Overflow or respective owner

Related posts about hpricot

Related posts about html5