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 %]&action=edit" itemprop="url">Details</a>
[% IF att.ispatch && Param('splinter_base') %]
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;