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:
@@ -771,7 +771,7 @@ def sx_page(ctx: dict, page_sx: str, *,
|
|||||||
component_defs=component_defs,
|
component_defs=component_defs,
|
||||||
styles_hash=styles_hash,
|
styles_hash=styles_hash,
|
||||||
styles_json=styles_json,
|
styles_json=styles_json,
|
||||||
pages_sx=pages_sx,
|
pages_sx=pages_sx.replace("{", "{{").replace("}", "}}"),
|
||||||
page_sx=page_sx,
|
page_sx=page_sx,
|
||||||
sx_css=sx_css,
|
sx_css=sx_css,
|
||||||
sx_css_classes=sx_css_classes,
|
sx_css_classes=sx_css_classes,
|
||||||
|
|||||||
Reference in New Issue
Block a user