Repository navigation
fix(shared): Markdown links and images with uppercase HTTPS keep their URLs - #43685
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…pipeline Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceRender the reported Markdown links and images in a Replay assistant response, alongside themed picture sources and JavaScript controls. Open the same seeded thread on each commit and capture Chromium at 1280×800 in both themes. Proven: uppercase/mixed-case links lose their destinations and uppercase/themed images fail on base; all work on head. JavaScript destinations remain stripped.
Not shown:
|
…r URLs (pingdotgg#43685) Co-authored-by: SAPHID <saphid@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit 40958c3)
…r URLs (pingdotgg#43685) Co-authored-by: SAPHID <saphid@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit 40958c3)




Problem
Markdown links and images lose their targets when an author writes
HTTPS:instead ofhttps:. Words preserves that casing, but the shared HAST sanitizer checks allowed protocols case-sensitively; the image collector also drops these images.Deterministic repro on
origin/main(44a533378653164dea96435e23c8ea27efaffedb)Fixture:
[site](HTTPS://example.com/a.png) .Run the actual shared pre-sanitize passes and image collector from the repository root:
Observed: the uppercase HTTPS row yields
<a>site</a><img alt="x">and[]; lowercase retains both targets. Expected: both HTTPS rows retainhrefandsrcashttps://example.com/a.pngand collect one image source; JavaScript remains stripped.Change
Lowercase only the HTTP(S) scheme in anchor targets and image sources before sanitization, including theme-specific picture sources. The URL remainder and protocol allowlist stay intact. Both web/desktop Words rendering and shared Markdown image collection use these passes; native mobile has its own renderer and needs no change here.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
vp test run packages/shared/src/markdownPipeline.test.ts -t "preserves HTTP"failed:HTTPS: expected undefined to be 'https://Example.com/A%2Fb.png?Key=Value#Part'.vp test run packages/shared/src/markdownPipeline.test.tspassed 3 consecutive times (26/26 each), covering lowercase, uppercase and mixed-case HTTP(S), image theme sources, URL remainder preservation, and disallowed schemes alongside existing local-file cases.vp run check:changed: exit 0.Authored by GPT-6.1 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).