Repository navigation
fix(Markdown): link destinations follow navigation contract, image sources reject every data: URL - #6355
fix(Markdown): link destinations follow navigation contract, image sources reject every data: URL#6355ManoharPaturi wants to merge 1 commit into
Conversation
Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: 36 accessibility violation(s) found — 2 critical, 34 serious. Button pattern - 1 issue(s)
ChatComposer - 1 issue(s)
ChatComposerInput - 1 issue(s)
ChatReasoning - 1 issue(s)
ChatToolCalls - 1 issue(s)
Checkbox pattern - 1 issue(s)
CheckboxList - 1 issue(s)
ClickableCard - 1 issue(s)
CodeEditor - 1 issue(s)
CodeEditorPerf - 1 issue(s)
CodeEditorTheme - 1 issue(s)
CodeTheme - 1 issue(s)
DateRangeInput - 1 issue(s)
FileInput - 1 issue(s)
GridMasonry - 1 issue(s)
Heading - 1 issue(s)
Icon - 1 issue(s)
LogStream - 1 issue(s)
MediaTheme Auto - 1 issue(s)
PowerSearch - 1 issue(s)
ProgressBar - 1 issue(s)
Radio group pattern - 1 issue(s)
RadioList - 1 issue(s)
RichTextEditor - 2 issue(s)
SelectableCard - 1 issue(s)
Stepper - 1 issue(s)
TableGroupedRows - 1 issue(s)
TableTree - 1 issue(s)
Text - 1 issue(s)
Theme - 1 issue(s)
PopArt - 1 issue(s)
Thumbnail - 1 issue(s)
Timestamp - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Visual RegressionStatus: No visual change across 4 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Closes a genuine gap: non-HTML data: URLs could reach parser AST nodes even though the documented contract names data: as rejected, and the new tests plus typecheck and formatting all pass.
One change is needed before approval. The patch uses a single URL check for both links and images, so it also rejects every data: link destination. The current navigation contract blocks javascript:, vbscript:, and data:text/html for navigation and keeps broader rejection reserved for embedded resources such as images. Please keep the stricter rejection for image sources and restore the existing navigation behavior for links, with tests pinning each side.
[Automated review]

Closes #6323.
Rebuilt against current main (the branch had drifted behind the url.ts policy refactor).
Policy split, per the review:
Tests pin each side: data:image/png links render, data:text/html links are dropped, data:image/* image sources are rejected, javascript: is rejected for both roles, and the standalone-image path is covered. Full parser suite 149/149 green, ruff clean.
Changeset updated to the split-policy wording.
The old head fought the url.ts refactor; this branch is cut fresh from main so the diff is just the policy split + tests + changeset.