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.
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.