diff --git a/app/main.py b/app/main.py index 16aa2ea..ac1b93a 100644 --- a/app/main.py +++ b/app/main.py @@ -129,9 +129,10 @@ def create_app() -> FastAPI: # Templates import json as _json + from markupsafe import Markup as _Markup templates_dir = Path(__file__).parent / "templates" templates = Jinja2Templates(directory=str(templates_dir)) - templates.env.filters["tojson"] = _json.dumps + templates.env.filters["tojson"] = lambda v: _Markup(_json.dumps(v)) # Register UI routes (must come before API to avoid catch-all conflicts) from .ui.routes import router as ui_router, setup_templates