summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-14 22:32:38 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-14 22:32:38 +0200
commit5c0a202257ca2195900ef4dbbe3215f1fd730727 (patch)
tree5c3d805835259e8b6dac37f90f229d31cbe8c4a9 /lib
parent9996da20c88d45c34b8f1267b23b83ae1e1bbea3 (diff)
utils: URI fragment is sometimes found in id attribute to A tag
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/utils/utils.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb
index ce5cdea4..22fcee37 100644
--- a/lib/rbot/core/utils/utils.rb
+++ b/lib/rbot/core/utils/utils.rb
@@ -623,13 +623,14 @@ module ::Irc
title = txt.ircify_html_title
debug opts
if frag = opts[:uri_fragment] and not frag.empty?
- fragreg = /<a\s+[^>]*name=["']?#{frag}["']?[^>]*>/im
+ fragreg = /<a\s+(?:[^>]+\s+)?(?:name|id)=["']?#{frag}["']?[^>]*>/im
debug fragreg
debug txt
if txt.match(fragreg)
# grab the post-match
txt = $'
end
+ debug txt
end
c_opts = opts.dup
c_opts[:strip] ||= title