It appears Hpricot has some issues with HTML5 tags. This can be avoided by using to_original_html instead of inner_html.
Unfortunately, unlike inner_html, to_original_html returns the container element as well as the html inside of it so we can't use it directly and instead must iterate over the children.
I've attached a pull request (with passing spec) for your perusal.
See https://github.com/hpricot/hpricot/issues/48
Re: https://github.com/eval/rack-pjax/blob/master/lib/rack/pjax.rb#L24
It appears Hpricot has some issues with HTML5 tags. This can be avoided by using
to_original_html
instead ofinner_html
.Unfortunately, unlike
inner_html
,to_original_html
returns the container element as well as the html inside of it so we can't use it directly and instead must iterate over the children.I've attached a pull request (with passing spec) for your perusal.