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 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 21:16:35 +00:00
parent bc9d9e51c9
commit d850f7c9c1

View File

@@ -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,