From d850f7c9c1d428fb37d2f161ee3f05ea88fb1fc1 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 21:16:35 +0000 Subject: [PATCH] Fix page registry: escape braces for str.format() pages_sx contains SX dict literals with {} (empty closures) which Python's str.format() interprets as positional placeholders, causing a KeyError that was silently caught. Escape braces before formatting. Co-Authored-By: Claude Opus 4.6 --- shared/sx/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/sx/helpers.py b/shared/sx/helpers.py index 255c98d..ff5ed5a 100644 --- a/shared/sx/helpers.py +++ b/shared/sx/helpers.py @@ -771,7 +771,7 @@ def sx_page(ctx: dict, page_sx: str, *, component_defs=component_defs, styles_hash=styles_hash, styles_json=styles_json, - pages_sx=pages_sx, + pages_sx=pages_sx.replace("{", "{{").replace("}", "}}"), page_sx=page_sx, sx_css=sx_css, sx_css_classes=sx_css_classes,