fix: JS syntax error on pages with special characters in content
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

x-data editor() arguments used manual |e escaping with single quotes.
Page content containing newlines, quotes or backslashes broke the
JavaScript string literal. Now uses |tojson filter for all fields
(proper JSON escaping).
This commit is contained in:
2026-07-10 13:07:27 -04:00
parent f7d9d91723
commit db6acf0ec3
+1 -1
View File
@@ -7,7 +7,7 @@
{% endblock %}
{% block content %}
<div class="page-editor-wrapper" x-data="editor('{{ page.id }}', '{{ page.title|e }}', '{{ page.content_format }}', '{{ page.content|e }}', {{ page_favorited | tojson }})" x-init="init()">
<div class="page-editor-wrapper" x-data="editor({{ page.id }}, {{ page.title | tojson }}, {{ page.content_format | tojson }}, {{ page.content | tojson }}, {{ page_favorited | tojson }})" x-init="init()">
<!-- ═══════════ Top Action Bar ═══════════ -->
<div class="page-topbar">