eval / rack-pjax

pjax for rails and rack applications
http://rack-pjax.herokuapp.com/
MIT License
205 stars 65 forks source link

Fixes a problem with parsing anchor tags #11

Closed luizcosta closed 12 years ago

luizcosta commented 12 years ago

I had an issue with anchor tags containing nested tags which were not parsed properly. I did a debug and found out that is an issue in Hpricot, described here: https://github.com/hpricot/hpricot/issues/31

As discussed in the issu the solution to this is what I propose in this pull request.

Instead of calling Hpricot(b) to parse the body now it uses Hpricot.XML(b), so it uses the xml parser to handle the nesting properly.

eval commented 12 years ago

Can you add a failing test as well?

luizcosta commented 12 years ago

@eval Just added the spec for this case.

eval commented 12 years ago

Applied - thanks for the patch!

luizcosta commented 12 years ago

You're welcome, I'm glad I could help.