eval/rack-pjax — pull request #5 by matthooks (2011-11-07 03:56:42+00:00)
Title: #inner_html is choking on self-closing tags within HTML5 elements

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 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 (and spec) for your perusal.