summaryrefslogtreecommitdiff
blob: 4be17b7276bbabebfeae81a6921d6a8d0796d8e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
commit ef0d5db568faa75073a43f45d5f544d4414a8ea3
Author: Lucas Carlson <lucas@rufy.com>
Date:   Tue Aug 24 14:42:26 2010 -0700

    Adding support for regex of UTF8 characters

Note that we also applied the change in 
http://hightechsorcery.com/2011/04/fixing-a-bug-in-simple-rss/

This effectively does not force an encoding for the regexp.

diff --git a/lib/simple-rss.rb b/lib/simple-rss.rb
index 38a5623..fc375ab 100644
--- a/lib/simple-rss.rb
+++ b/lib/simple-rss.rb
@@ -152,13 +152,13 @@ class SimpleRSS
 	end
 	
   def unescape(content)
-  	if content =~ /([^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]%)/n then
-  		CGI.unescape(content).gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
+  	if content =~ /([^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]%)/ then
+  		CGI.unescape(content).gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
   	else
-  		content.gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
+  		content.gsub(/(<!\[CDATA\[|\]\]>)/,'').strip
   	end
   end
 end
 
 class SimpleRSSError < StandardError
-end
\ No newline at end of file
+end