]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1142365: Don't use <pre> for markdown comments in email
authorAlbert Ting <altlist@gmail.com>
Tue, 24 Mar 2015 13:36:33 +0000 (21:36 +0800)
committerByron Jones <glob@mozilla.com>
Tue, 24 Mar 2015 13:36:33 +0000 (21:36 +0800)
r=glob,a=glob

template/en/default/email/bugmail.html.tmpl
template/en/default/email/flagmail.html.tmpl

index 37252977a2710423e7fe55010cbf02768c0c3d0d..c3b8b357f38cf781a293fd04b83dd1136995f8a8 100644 (file)
@@ -27,7 +27,8 @@
               on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none %]
               from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b>
           [% END %]
-        <pre>[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</pre>
+        [% comment_div = comment.is_markdown ? "div" : "pre" %]
+        <[% comment_div FILTER none %] class="bz_comment_text">[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</[% comment_div FILTER none %]>
         </div>
       [% END %]
       </p>
index 314455c6583b7f725eb7ef8a9e77fdf1c5bff5a0..d0b61fbbc2dba7e3793bd58da5959479a7ce5036 100644 (file)
@@ -72,7 +72,8 @@
           [% ELSE %]
             <b>Description:</b>
           [% END %]
-          <pre>[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</pre>
+          [% comment_div = comment.is_markdown ? "div" : "pre" %]
+          <[% comment_div FILTER none %] class="bz_comment_text">[% comment.body_full({ wrap => 1 }) FILTER markdown(bug, comment, to_user) %]</[% comment_div FILTER none %]>
         </div>
       [% END %]
     </p>