Skip to content
Browse files

Adding support for regex of UTF8 characters

  • Loading branch information...
1 parent aaf86ad commit ef0d5db568faa75073a43f45d5f544d4414a8ea3 Lucas Carlson committed Aug 24, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/simple-rss.rb
8 lib/simple-rss.rb
@@ -152,13 +152,13 @@ def clean_tag(tag)
def unescape(content)
- if content =~ /([^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]%)/n then
- CGI.unescape(content).gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
+ if content =~ /([^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]%)/un then
+ CGI.unescape(content).gsub(/(<!\[CDATA\[|\]\]>)/u,'').strip
- content.gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
+ content.gsub(/(<!\[CDATA\[|\]\]>)/u,'').strip
class SimpleRSSError < StandardError

6 comments on commit ef0d5db


Actually, this doesn't fix the error.

But replacing /un with /u in line 155 does.


Also, I recommend including this fix in the version people get when running 'gem install simple-rss'.
so they don't have to download from git and build the gem themselves, or edit the source themselves like I did.





This gem works pretty good, the problem is that still has the UTF bug.

cwarren commented on ef0d5db Aug 3, 2012

rebbaron - thanks for the update / tip!



Audio commented on ef0d5db Feb 4, 2013

@redbar0n thanks

Please sign in to comment.
Something went wrong with that request. Please try again.