I have a Rails app that is reading in RSS feeds using the simple_feed gem. However, some of the feeds don't read in correctly - namely, some of the titles have:
`‘`
or
`’`
instead of: "
My titles read in as:
i.title
and I was thinking that gsub can fix this easily, but I was have trouble making it work. I tried:
i.title.gsub(%r[‘]/, '"')
which I'm not even sure would work, but it commented out the line after the #
.
Then I tried:
i.title.gsub(%r["‘"]/, '*')
which results in:
C:/Sites/foo/app/views/bar/show.html.erb:20: syntax error, unexpected ','
...( i.title.gsub(%r["‘"]/, '*') )
I haven't really used gsub before, I was trying to work off these examples. Can something please help me figure out what I'm doing wrong?