Commit d3deaa4
committed
markets/: fix the share-entry regex that killed the client, and guard the class
ui.js is one big server-side template literal, so a backslash escape is
consumed before the browser ever sees it: my /\/m\// share-path regex
arrived as //m// and the ENTIRE app died on "Unexpected token 'const'" —
the market list hung on "Loading markets…" and nothing worked. Rewritten
with plain string operations, which are immune.
The meta-tag tests could not see this: they assert on <head> while the
damage was in <script>. Added a parse guard that compiles every inline
script with new Function (compile, not execute) across both the plain and
per-market render paths, so a template-literal escape can never take the
app down silently again. 78 tests.1 parent 6b21bfc commit d3deaa4
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
344 | 361 | | |
345 | 362 | | |
346 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | | - | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1622 | 1627 | | |
1623 | | - | |
| 1628 | + | |
1624 | 1629 | | |
1625 | 1630 | | |
1626 | 1631 | | |
| |||
0 commit comments