summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-02-17 05:04:16 +0100
committerByron Jones <glob@mozilla.com>2015-02-17 05:04:16 +0100
commitc8c9ad098624c0af1f440cd0e8d61e27767f2b6b (patch)
tree2d50a70844c1feb34ad262bcb33c70df2e023d32 /extensions
parent42e7bbfa6271c99fff3fa484733a504f4bc19c20 (diff)
downloadbugzilla-c8c9ad098624c0af1f440cd0e8d61e27767f2b6b.tar.gz
bugzilla-c8c9ad098624c0af1f440cd0e8d61e27767f2b6b.tar.xz
Bug 1120048: Strange formatting on inline URLs
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/Extension.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index a8853463d..0e43830ee 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -569,11 +569,13 @@ sub bug_format_comment {
# link to svn.m.o
push (@$regexes, {
- match => qr/\br(\d{4,})\b/,
+ match => qr/(^|\s)r(\d{4,})\b/,
replace => sub {
my $args = shift;
- my $match = html_quote($args->{matches}->[0]);
- return qq{<a href="https://viewvc.svn.mozilla.org/vc?view=rev&amp;revision=$match">r$match</a>};
+ my $match = $args->{matches}->[1];
+ return
+ $args->{matches}->[0] .
+ qq{<a href="https://viewvc.svn.mozilla.org/vc?view=rev&amp;revision=$match">r$match</a>};
}
});