summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-26 13:31:53 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-01-26 13:32:32 +0100
commit299c928efdedfb25c76c14077fe3060db54ceeb1 (patch)
tree38d0a0b63e7b59b71c42503d06522250313f291f
parent12a508e1a75bc1de501f36ca9e4767f2349fe12e (diff)
extends: fix riphtml
-rw-r--r--lib/rbot/core/utils/extends.rb2
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(/&amp;/,'&').gsub(/&quot;/,'"').gsub(/&lt;/,'<').gsub(/&gt;/,'>').gsub(/&ellip;/,'...').gsub(/&apos;/, "'").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,