From 299c928efdedfb25c76c14077fe3060db54ceeb1 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 26 Jan 2011 13:31:53 +0100 Subject: [PATCH] extends: fix riphtml --- lib/rbot/core/utils/extends.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.39.2