diff options
author | Albert Ting <altlist@gmail.com> | 2016-05-13 21:17:07 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-05-13 21:17:07 +0200 |
commit | 0748e8411232181e3a769a5f3a3b60ad98239777 (patch) | |
tree | b80d5370ceb9b139887647fd9f0961492f56a55b /Bugzilla/Template.pm | |
parent | ab99e8dc2ce17827247f49fa34a13ef30ff8e449 (diff) | |
download | bugzilla-0748e8411232181e3a769a5f3a3b60ad98239777.tar.gz bugzilla-0748e8411232181e3a769a5f3a3b60ad98239777.tar.xz |
Bug 1208947 - Comment links in markdown-based emails are incomplete
r=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index ada5c389c..49294244a 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -163,7 +163,8 @@ sub quoteUrls { # If the comment is already wrapped, we should ignore newlines when # looking for matching regexps. Else we should take them into account. - my $s = ($comment && $comment->already_wrapped) ? qr/\s/ : qr/\h/; + # And confirm comment is an object, it could be a hash from WebService::Bug::render_comment + my $s = ($comment && ref($comment) eq 'Bugzilla::Comment' && $comment->already_wrapped) ? qr/\s/ : qr/\h/; # However, note that adding the title (for buglinks) can affect things # In particular, attachment matches go before bug titles, so that titles @@ -827,7 +828,7 @@ sub create { && ((ref($comment) eq 'HASH' && $comment->{is_markdown}) || (ref($comment) eq 'Bugzilla::Comment' && $comment->is_markdown))) { - return Bugzilla->markdown->markdown($text); + return Bugzilla->markdown->markdown($text, $bug, $comment); } return quoteUrls($text, $bug, $comment, $user); }; |