From 50b33ab08e3ec6d20a0e097ef9aeffcd48ec2ea7 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Mar 2026 01:43:00 +0000 Subject: [PATCH] Fix page helper results being quoted as string literals in defpage slots Page helpers return SX source strings from render_to_sx(), but _aser's serialize() was wrapping them in double quotes. In async_eval_slot_to_sx, pass string results through directly since they're already SX source. Co-Authored-By: Claude Opus 4.6 --- shared/sx/async_eval.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/sx/async_eval.py b/shared/sx/async_eval.py index b89eba9..7e8cd63 100644 --- a/shared/sx/async_eval.py +++ b/shared/sx/async_eval.py @@ -943,6 +943,10 @@ async def async_eval_slot_to_sx( return result.source if result is None or result is NIL: return "" + # Page helpers return SX source strings from render_to_sx() — + # pass through directly instead of quoting via serialize(). + if isinstance(result, str): + return result return serialize(result)