Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#inner_html is choking on self-closing tags within HTML5 elements #5

Merged
merged 1 commit into from
Nov 7, 2011
Merged

#inner_html is choking on self-closing tags within HTML5 elements #5

merged 1 commit into from
Nov 7, 2011

Conversation

matthooks
Copy link

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

@eval eval merged commit 680a7d5 into eval:master Nov 7, 2011
@eval
Copy link
Owner

eval commented Nov 7, 2011

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants