Commit fccb378
Reported by @wangzh1998 (#18): LaTeX containing `<` (e.g. y_{<t}) was emitted
raw into the HTML, so the browser parsed `<t}...` as an HTML tag and silently
ate the rest of the formula — breaking §3.1 / Q20 / §1.2 of the KL tutorial and
~18 other spots across 7 tutorials (and any `>` / `&` matrix-align math too).
Root cause: tools/render_html.py stashed math bodies as passthrough WITHOUT
HTML-escaping them. Fix: html_lib.escape(body, quote=False) in the display- and
inline-math substitutions. MathJax v3 reads the decoded DOM text, so it still
sees the original LaTeX — escape-transparent (Codex-verified CORRECT, MathJax-safe;
no entity workarounds exist in source, so no double-escaping).
Re-rendered all 51 tutorial HTMLs with the fixed pipeline. Gate
`verify_reviews.py --mode strict --reproduce`: 51 OK / 0 FAIL / 3 EXEMPT —
every page byte-reproduces from source. Blogs unaffected (hand-authored, math
in \(...\) with no raw `<`).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5c5d738 commit fccb378
54 files changed
Lines changed: 398 additions & 393 deletions
File tree
- docs
- tutorials
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| |||
0 commit comments