]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1202853 - Markdown doesn't work when adding a comment attachment
authorAlbert Ting <altlist@gmail.com>
Sat, 2 Jan 2016 21:29:01 +0000 (16:29 -0500)
committerDylan Hardison <dylan@mozilla.com>
Sat, 2 Jan 2016 21:29:01 +0000 (16:29 -0500)
r=dylan,a=dylan

attachment.cgi

index e7fadf66f0cbfe99979d01731d0e933bc8398281..ae9efef6aac6686d0072e4911109727db0cf4d13 100755 (executable)
@@ -548,9 +548,12 @@ sub insert {
     # Insert a comment about the new attachment into the database.
     my $comment = $cgi->param('comment');
     $comment = '' unless defined $comment;
+    my $is_markdown = ($user->use_markdown
+                       && $cgi->param('use_markdown')) ? 1 : 0;
     $bug->add_comment($comment, { isprivate => $attachment->isprivate,
                                   type => CMT_ATTACHMENT_CREATED,
-                                  extra_data => $attachment->id });
+                                  extra_data => $attachment->id,
+                                  is_markdown => $is_markdown});
 
     # Assign the bug to the user, if they are allowed to take it
     my $owner = "";