]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1514765 - fix new bug comment preview
authorIsrael Madueme <purelogiq@gmail.com>
Tue, 18 Dec 2018 03:31:39 +0000 (22:31 -0500)
committerDylan William Hardison <dylan@hardison.net>
Tue, 18 Dec 2018 03:31:39 +0000 (22:31 -0500)
We forgot to correctly switch between a div and pre tag on the new
bug comment preview, based on whether markdown is enabled or not.
This was causing plaintext comments to lose their formatting.

template/en/default/bug/comment.html.tmpl

index 77c393366b81797cfe83f16c6851c0d4b3a8f85e..ddcba4e824c80a942a0bf61956ad02ae5e0230ac 100644 (file)
   <div id="comment_preview" class="bz_default_hidden bz_comment">
     <div id="comment_preview_loading" class="bz_default_hidden">Generating Preview...</div>
     <div id="comment_preview_error" class="bz_default_hidden"></div>
-    <div id="comment_preview_text" class="bz_comment_text"></div>
+    [% IF comment.is_markdown AND Param('use_markdown') %]
+      [% comment_tag = 'div' %]
+    [% ELSE %]
+      [% comment_tag = 'pre' %]
+    [% END %]
+    <[% comment_tag FILTER none %] id="comment_preview_text" class="bz_comment_text"></[% comment_tag FILTER none %]>
   </div>
 [% END %]