fix: Markdown import in admin preview route

This commit is contained in:
2026-07-22 21:25:27 +02:00
parent 3ac1ef78c2
commit 19c6161ae0
+2 -2
View File
@@ -316,11 +316,11 @@ async def admin_preview(
"""Render Markdown body to HTML and return it."""
await validate_csrf_form(request)
from .markdown import Markdown
from .markdown import render
form = await request.form()
body = str(form.get("body", ""))
html = Markdown.render(body)
html = render(body)
return HTMLResponse(content=html)