From 039a886d8e3f90229f4cc892f504e7790d072931 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 19 Oct 2009 12:22:16 +0000 Subject: [PATCH] Bug 509152: Line breaks erroneously present in comments for bugs in XML format - Patch by Thomas Ehrnhoefer r/a=LpSolit --- Bugzilla/BugMail.pm | 1 + template/en/default/bug/format_comment.txt.tmpl | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) mode change 100755 => 100644 template/en/default/bug/format_comment.txt.tmpl diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 5bbbe723a8..9a8baca590 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -684,6 +684,7 @@ sub get_comments_by_bug { if ($comment->{body} =~ /Created an attachment \(/) { $comment->{body} =~ s/(Created an attachment \(id=([0-9]+)\))/$1\n --> \($attach_base$2\)/g; } + $comment->{body} = $comment->{'already_wrapped'} ? $comment->{body} : wrap_comment($comment->{body}); } if (Bugzilla->params->{'insidergroup'}) { diff --git a/template/en/default/bug/format_comment.txt.tmpl b/template/en/default/bug/format_comment.txt.tmpl old mode 100755 new mode 100644 index 6da39e6eb0..87734a9ae0 --- a/template/en/default/bug/format_comment.txt.tmpl +++ b/template/en/default/bug/format_comment.txt.tmpl @@ -33,14 +33,8 @@ [% PROCESS 'global/field-descs.none.tmpl' %] -[% IF comment.already_wrapped %] - [% wrapped_comment = comment.body %] -[% ELSE %] - [% wrapped_comment = comment.body FILTER wrap_comment %] -[% END %] - [%- IF comment.type == constants.CMT_DUPE_OF -%] -[% wrapped_comment %] +[% comment.body %] *** This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ comment.extra_data %] *** [% ELSIF comment.type == constants.CMT_HAS_DUPE %] @@ -48,7 +42,7 @@ [% ELSIF comment.type == constants.CMT_POPULAR_VOTES %] *** This [% terms.bug %] has been confirmed by popular vote. *** [% ELSIF comment.type == constants.CMT_MOVED_TO %] -[% wrapped_comment %] +[% comment.body %] [%+ terms.Bug %] moved to [% Param("move-to-url") %]. If the move succeeded, [% comment.extra_data %] will receive a mail containing @@ -57,5 +51,5 @@ If all went well, please mark this [% terms.bug %] [%+ get_status('VERIFIED') %], and paste in a link to the new [% terms.bug %]. Otherwise, reopen this [% terms.bug %]. [%- ELSE -%] -[%- wrapped_comment %] +[%- comment.body %] [% END %] -- 2.47.2