Hpricot did something less than delightful

I have a Rails application that uses Hpricot, “a fast and delightful HTML parser” for Ruby.

It seems, however, that this change (the one in xchar.rb, specifically), present in 0.6, but not 0.5 causes the inner_text method to fail less than gracefully, spitting out a ? character instead of simply letting through the unescaped text. I was depending on the latter behavior, so this change blew up my code. It’s a good thing I caught it before going to production.

Other than that, I’ve been very happy with Hpricot, and it is indeed quite quick and useful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s