v0.2.3
v0.2.3 β Release Notes
π Bug Fix
SSR props no longer break JSON.parse on pages containing <!-- or -->
The inline-JSON escaper (pyxle.ssr._escape.escape_inline_json) previously rewrote HTML-comment sequences with backslash escapes that are not valid JSON:
<!--β<\!--β\!is not a legal JSON escape-->β--\>β\>is not a legal JSON escape
Any page whose props contained a literal --> (very common in docs that quote shell output, code examples, or arrow markers) would fail at hydration with:
[Pyxle] Failed to parse initial props
SyntaxError: Bad escaped character in JSON
The fix swaps the problematic replacements for Unicode escapes β which are valid JSON β and still neutralise the HTML-tokenizer sequences:
<!--β\u003c!---->β--\u003e
π§ͺ Tests
- Added a parametrised
test_output_is_valid_json_after_escapethat round-trips escaped output throughjson.loadsto catch this class of regression. - 1127 total tests, all passing.
π¦ Install
pip install --upgrade pyxle-framework==0.2.3π Migration
None. This is a pure bug fix β existing apps just need to redeploy with 0.2.3 to get correct behaviour.