From: Kohei Yoshino Date: Thu, 4 Apr 2019 20:59:24 +0000 (-0400) Subject: Bug 1541231 - Certain Phablicator requests are displayed as inline attachment X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b69ebc4ba9a2974f2a95b2d3ef5c46f3c8cf2b9c;p=thirdparty%2Fbugzilla.git Bug 1541231 - Certain Phablicator requests are displayed as inline attachment --- diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index 7d470e107..55c792dfa 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -262,6 +262,7 @@ class="attachment[% " patch" IF att.ispatch; " obsolete" IF att.isobsolete; " deleted" IF !att.datasize %]" data-id="[% att.id FILTER none %]" itemscope itemtype="http://schema.org/MediaObject" [% IF comment.collapsed +%] style="display:none"[% END ~%]> +
@@ -274,7 +275,7 @@ [% ELSE %] [% END %] - [% att.description FILTER html %] + [% att.description FILTER html %] [% " (obsolete)" IF att.isobsolete; " (deleted)" IF !att.datasize %] — [% IF att.ispatch && Param('splinter_base') %] diff --git a/extensions/BugModal/web/comments.js b/extensions/BugModal/web/comments.js index 38dcfb73a..359612916 100644 --- a/extensions/BugModal/web/comments.js +++ b/extensions/BugModal/web/comments.js @@ -560,7 +560,7 @@ Bugzilla.BugModal.Comments = class Comments { async show_attachment($att) { const id = Number($att.dataset.id); const link = $att.querySelector('.link').href; - const name = $att.querySelector('[itemprop="name"]').textContent; + const name = $att.querySelector('[itemprop="name"]').content; const type = $att.querySelector('[itemprop="encodingFormat"]').content; const size = Number($att.querySelector('[itemprop="contentSize"]').content); const max_size = 2000000;