From 6b9187f420cfacb37a71ce9987a132c57f133a33 Mon Sep 17 00:00:00 2001 From: Deeman Date: Mon, 2 Mar 2026 12:01:16 +0100 Subject: [PATCH] fix(articles): iframe preview + collapsible meta + word count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the auto-escaped `{{ body_html }}` div (showed raw HTML tags) with a sandboxed ` + {% else %} +

Start writing to see a preview.

+ {% endif %} @@ -423,4 +397,17 @@ + {% endblock %} diff --git a/web/src/padelnomics/admin/templates/admin/partials/article_preview.html b/web/src/padelnomics/admin/templates/admin/partials/article_preview.html index 92fba48..7630039 100644 --- a/web/src/padelnomics/admin/templates/admin/partials/article_preview.html +++ b/web/src/padelnomics/admin/templates/admin/partials/article_preview.html @@ -1,5 +1,12 @@ -{% if body_html %} -
{{ body_html }}
+{# HTMX partial: sandboxed iframe showing a rendered article preview. + Rendered by POST /admin/articles/preview. #} +{% if preview_doc %} + {% else %}

Start writing to see a preview.

{% endif %}