summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2006-03-03 21:26:25 +0100
committerjocuri%softhome.net <>2006-03-03 21:26:25 +0100
commit1ad86477368357ad219fe1fdc796913effdd0116 (patch)
tree357d91027f880b1813aecb2188bf7e8bd0b21f18 /Bugzilla
parentfde9d2fecae2c1e141626a598e48323d8d39d3c8 (diff)
downloadbugzilla-1ad86477368357ad219fe1fdc796913effdd0116.tar.gz
bugzilla-1ad86477368357ad219fe1fdc796913effdd0116.tar.xz
Patch for bug 74355: Set tooltip to bug title for full-url buglinks; patch by David D. Kilzer (ddk) <ddkilzer@kilzer.net>, r=vladd, a=justdave.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 57d113ef7..2a83a4bea 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -27,6 +27,7 @@
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
# Greg Hendricks <ghendricks@novell.com>
+# David D. Kilzer <ddkilzer@kilzer.net>
package Bugzilla::Template;
@@ -271,6 +272,13 @@ sub quoteUrls {
my $count = 0;
my $tmp;
+ # Provide tooltips for full bug links (Bug 74355)
+ my $urlbase_re = '(' . join('|', map { qr/$_/ } grep($_, Param('urlbase'), Param('sslbase'))) . ')';
+ $text =~ s~\b(${urlbase_re}\Qshow_bug.cgi?id=\E([0-9]+))\b
+ ~($things[$count++] = get_bug_link($3, $1)) &&
+ ("\0\0" . ($count-1) . "\0\0")
+ ~egox;
+
# non-mailto protocols
my $protocol_re = qr/(afs|cid|ftp|gopher|http|https|irc|mid|news|nntp|prospero|telnet|view-source|wais)/i;
@@ -282,7 +290,7 @@ sub quoteUrls {
("\0\0" . ($count-1) . "\0\0")
~egox;
- # We have to quote now, otherwise our html is itsself escaped
+ # We have to quote now, otherwise the html itself is escaped
# THIS MEANS THAT A LITERAL ", <, >, ' MUST BE ESCAPED FOR A MATCH
$text = html_quote($text);