Fetch html and strip tags

I’ve got this statement in a view

<% open(bill.bill_url).read %>

It’s grabbing a url from the db and displaying the html code fine. But
I’d like to just display the contents of one tag. Is there an easy way
to strip tags, or choose just one?

Or, will I have to use something like hpricot?


If you just want to strip HTML tags take a look at the white_list
plugin, http://www.agilewebdevelopment.com/plugins/whitelist. If you
need to do more specific things, Hpricot is a good option.

Kind regards,

Nick S.

Compare Rails hosting