Skip to content

Toolify: isolate safe copyable embeds and honor Web Share cancellation - #97

Merged
appdevelopsk merged 5 commits into
mainfrom
fix/toolify-safe-embed-and-cancel-20261115
Nov 15, 2026
Merged

appdevelopsk merged 5 commits into
mainfrom
fix/toolify-safe-embed-and-cancel-20261115

Conversation

@appdevelopsk

Copy link
Copy Markdown
Owner

Scope (safe carve-out from conflicting Draft PR #41)

Keep current international sharing links, result-link analytics and CTA layout untouched. Cherry-pick only two isolated fixes from PR #41 into current main:

  1. site/src/lib/tools/embed-html.ts validates allowed URL schemes / no credential-bearing URLs, escapes HTML text and attributes, and qualifies both distributed embed credits with rel="noopener noreferrer nofollow" rather than incentivizing widget backlinks.
  2. site/src/lib/tools/share-errors.ts checks Web Share API AbortError, so a user cancelling native share no longer unexpectedly copies the URL to clipboard; other failures retain existing fallback.
  3. ShareBar.tsx uses both functions without changing the existing socialShareUrl attribution behavior or page layout. Added Vitest tests for two helpers.

Verification

  • Source and dependency readback on this PR: 12/12 integration-contract checks passed.
  • Two exact byte-matched Git blobs were copied to a local Node 22.16.0 runtime; verified their Git blob hashes, then ran node --experimental-strip-types --test against them: 8/8 native tests passed, covering HTML injection, URL schemes, credential rejection, nofollow links and genuine Web Share user cancellation. An initial overly-broad test assertion was corrected before final passing run; underlying source code was unchanged.
  • No full Next.js production build, broad Vitest suite, browser share-sheet test, GitHub Actions or VPS deployment. Do not infer traffic increase or restored GSC indexing.

PR #41 retains its unrelated manual deploy lock and E2E gates; do not merge it wholesale without review.

@appdevelopsk
appdevelopsk merged commit ba0cc69 into main Nov 15, 2026
1 check passed
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