Skip to content

fix(annotate): report an unsafe bound link even next to a plain one - #21

Merged
vite-hub[bot] merged 1 commit into
mainfrom
fix/annotate-unsafe-link
Oct 20, 2026
Merged

vite-hub[bot] merged 1 commit into
mainfrom
fix/annotate-unsafe-link

Conversation

@onmax

@onmax onmax commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Follow-up to #12, from its second review. It was pushed after #12 had merged.

::screenshot{href="https://safe.example" :href='"javascript:alert(1)"'} rendered the safe link and reported nothing about the unsafe binding, because the check looked at the resolved attributes, where the plain value still filled href. The binding is now resolved on its own. A unit test covers it.

🤖 Generated with Claude Code

@vite-hub

vite-hub Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

Session

Waiting for review checks before the next pass.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/comark-annotate@21
pnpm add https://pkg.pr.new/comark-carousel@21
pnpm add https://pkg.pr.new/comark-zoom@21

commit: 4b715aa

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 4b715aa 2026-10-20T09:56:26.149Z Visit the dashboard ↗

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Unsafe bound-link detection — Updated checkProps to resolve each bound valid prop independently, preventing a neighboring plain href or src from masking an unsafe binding while retaining the renderer's existing filtering behavior.
  • Regression coverage — Added a parse-and-render test covering a safe plain link next to an unsafe :href binding and verifying the unsafe URL is omitted from HTML.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit 80e43cf into main Oct 20, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
onmax added a commit that referenced this pull request Oct 20, 2026
The earlier merge of main kept this branch's annotate files and dropped main's
annotate changes (#12, #21). This takes main as it is and adds the slider on top.
It also drops the annotateIssues alias that main had replaced with meta.issues,
suppresses the click that ends a drag by remembering whether the last press
dragged instead of guessing a touch origin, and gives the zoomed slider's handle
its tab stop back.
vite-hub Bot pushed a commit that referenced this pull request Oct 20, 2026
#14 was squashed from a branch older than #12 and #21, so it put back annotate's earlier read.ts and tests:
an unknown prop named `constructor` or `__proto__` printed Object's own value as its hint, viewports compared as
strings ("0900x0360" no longer matched "900x360"), and two tests expected the old href message. Those parts
are restored; #17's compare mode stays.

The slider e2e test clicked at coordinates measured before focusing the handle, which can scroll the page, so it
missed the slider under load. It measures again before that click.

zoom's client.ts holds its own copy of the zoom script since #14, so its doctor suppression covers it too.
@onmax
onmax deleted the fix/annotate-unsafe-link branch November 1, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant