Fix attachments with empty self-closing tag #224

This commit is contained in:
lowlighter
2021-04-24 21:44:35 +02:00
parent a282b79779
commit a8e4b4652b
2 changed files with 64 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
<% if (account === "user") { %>
<% if ((account === "user")&&((base.activity)||(base.community))) { %>
<section>
<div class="row">
<% if (base.activity) { %>
<section>
@@ -56,4 +57,5 @@
</section>
<% } %>
</div>
</section>
<% } %>

View File

@@ -28,10 +28,13 @@
<% for (const {text, createdAt, attachments} of plugins.tweets.list) { %>
<div class="tweet">
<%- text %>
<% if (attachments) { %>
<% if (attachments?.length) { %>
<div class="attachments">
<% for (const {image, title, description, website} of attachments) { %>
<div style="background-image: url('<%= image %>');">
<span style="display: none;">
Hack to avoid self-closing empty div, do not remove
</span>
<% if (title) { %>
<div class="infos">
<div class="title"><%= title %></div>