Repository navigation
Fix double entity decoding in fetched page titles - #79
Conversation
extractTitle decoded & first and then </>/", so a page title containing the literal text "&lt;" became "<". Code points above the BMP went through String.fromCharCode and produced broken surrogates. Decode every entity once and use fromCodePoint. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vuitu9gf4wHQCs8NPs5NXN
|
Dependency drift (flagged, not changed; needs a decision)
Both sit on the MCP surface, so I left them for a developer to upgrade and run the MCP tests against. Transitive advisories in dev tooling only (via wrangler/miniflare/vitest): Safe patch/minor candidates: Reviewed with no defects found: Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
shrtnr | 4622467 | Oct 16 2026, 07:20 PM |
extractTitle only decoded the hex reference ', so titles such as "Foo — Bar" kept the raw entity. It also skipped &, <, > and ", which HTML defines alongside the lowercase forms. Mixed-case names stay literal, matching HTML. Carries over the broader decoder from the closed PR #76 on top of the merged fix in #79.
Weekly defect review. One fix; dependency findings are in the comment below.
What was wrong:
extractTitle(src/title-fetch.ts) decoded&first, then</>/". A title containing the literal text&lt;became<. Code points above U+FFFF went throughString.fromCharCodeand produced broken surrogates.Impact: Wrong auto-generated link titles (low severity; output is escaped on render).
Fix: Decode every entity in a single pass and use
String.fromCodePoint. No API or contract change.Tests: Two new cases in
src/__tests__/unit/title-fetch.test.tsfailed before the fix and pass after. Fullyarn test: 1598 passed. Nosrc/pages,src/adminor client paths touched, so e2e not required.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vuitu9gf4wHQCs8NPs5NXN
Generated by Claude Code