]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1541231 - Certain Phablicator requests are displayed as inline attachment
authorKohei Yoshino <kohei.yoshino@gmail.com>
Thu, 4 Apr 2019 20:59:24 +0000 (16:59 -0400)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2019 20:59:24 +0000 (16:59 -0400)
extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
extensions/BugModal/web/comments.js

index 7d470e10728929081f3b811283107623315f6f23..55c792dfa7679073307bd8c2fca1d5b5602d5121 100644 (file)
          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 ~%]>
+      <meta itemprop="name" content="[% att.filename FILTER html %]">
       <meta itemprop="contentSize" content="[% att.datasize FILTER none %]">
       <meta itemprop="encodingFormat" content="[% att.mimetype FILTER html %]">
       <div class="label">
         [% ELSE %]
           <a class="link[% " lightbox" IF att.is_image %]" href="[% link FILTER html %]" itemprop="contentUrl">
         [% END %]
-        <span id="att-[% att.id FILTER none %]-description" itemprop="name">[% att.description FILTER html %]</span></a>
+        <span id="att-[% att.id FILTER none %]-description" itemprop="description">[% att.description FILTER html %]</span></a>
         [% " (obsolete)" IF att.isobsolete; " (deleted)" IF !att.datasize %]
         — <a href="[% link FILTER html %]&amp;action=edit" itemprop="url">Details</a>
         [% IF att.ispatch && Param('splinter_base') %]
index 38dcfb73ae3c475ebc7befbadbfaba39b4621e40..359612916e6fe93b2192118dc54a701b56cba3b3 100644 (file)
@@ -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;