views:

18

answers:

2

Hello,

I'm pulling in the RSS feed from Craigslist into a rails app I'm building. When I try and insert content from the posts into my database, there's plenty of bad characters that cause the database to choke.

I've tried a few different methods (the Sanitize plugin, hpricot, regexing the input) but nothing seems to work right.

I'm still a rails noob so I thought I'd appeal to the community. Any tips on how to handle bum characters in RSS feeds?

A: 

Have you tried Nokogiri (Railscasts video)?

Actually Ryan Bates has a screen cast on feed parsing: feed parsing.

Jon Smock
Fantastic resource. Thanks.
thekevinscott
A: 

I love Feed Normalizer http://feed-normalizer.rubyforge.org/

Labuschin