summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-01-29 19:35:54 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-01-29 19:35:54 +0000
commit9629ed554bae9bc0e851203f6c820badd09c43c7 (patch)
treeae50e3ba97ea31f2437d20509d450b577d7de994 /data/rbot
parentefa976263e8bb4b05d41a39a7e4adf492b80711b (diff)
Fix urban handling of links
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/urban.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb
index d2ea8645..c77a2e45 100644
--- a/data/rbot/plugins/urban.rb
+++ b/data/rbot/plugins/urban.rb
@@ -60,14 +60,14 @@ class UrbanPlugin < Plugin
def get_def(text)
# Start by removing the prev/home/next links
- t = text.gsub(/(?:<a href.*?>prev<\/a> )?<a href.*?>home<\/a>(?: <a href.*?>next<\/a>)?/,'')
+ t = text.gsub(/(?:<a href[^>]*>prev<\/a> )?<a href[^>]*>home<\/a>(?: <a href[^>]*>next<\/a>)?/,'')
# Close up paragraphs
t.gsub!(/<\/?p>/, ' ')
t.gsub!("\n", ' ')
# Reverse headings
t.gsub!(/<\/?b>/,"#{Reverse}")
# Enbolden links
- t.gsub!(/<\/?a(?: .*?)?>/,"#{Bold}")
+ t.gsub!(/<\/?a(?: [^>]*)?>/,"#{Bold}")
# Reverse examples
t.gsub!(/<\/?(?:i|em)>/,"#{Underline}")
# Clear anything else