diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-26 13:31:53 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-26 13:32:32 +0100 |
commit | 299c928efdedfb25c76c14077fe3060db54ceeb1 (patch) | |
tree | 38d0a0b63e7b59b71c42503d06522250313f291f | |
parent | 12a508e1a75bc1de501f36ca9e4767f2349fe12e (diff) |
extends: fix riphtml
-rw-r--r-- | lib/rbot/core/utils/extends.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/extends.rb b/lib/rbot/core/utils/extends.rb index d734db61..208cb089 100644 --- a/lib/rbot/core/utils/extends.rb +++ b/lib/rbot/core/utils/extends.rb @@ -341,7 +341,7 @@ class ::String # This method will strip all HTML crud from the receiver # def riphtml - self.gsub(/<[^>]+>/, '').gsub(/&/,'&').gsub(/"/,'"').gsub(/</,'<').gsub(/>/,'>').gsub(/&ellip;/,'...').gsub(/'/, "'").gsub("\n",'') + Utils.decode_html_entities(self.gsub("\n",' ').gsub(/<\s*br\s*\/?\s*>/, ' ').gsub(/<[^>]+>/, '')).gsub(/\s+/,' ') end # This method tries to find an HTML title in the string, |