Repository navigation
Toolify: isolate safe copyable embeds and honor Web Share cancellation - #97
Merged
Merged
Conversation
This was referenced Nov 15, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:site/src/lib/tools/embed-html.tsvalidates allowed URL schemes / no credential-bearing URLs, escapes HTML text and attributes, and qualifies both distributed embed credits withrel="noopener noreferrer nofollow"rather than incentivizing widget backlinks.site/src/lib/tools/share-errors.tschecks Web Share APIAbortError, so a user cancelling native share no longer unexpectedly copies the URL to clipboard; other failures retain existing fallback.ShareBar.tsxuses both functions without changing the existingsocialShareUrlattribution behavior or page layout. Added Vitest tests for two helpers.Verification
node --experimental-strip-types --testagainst 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.PR #41 retains its unrelated manual deploy lock and E2E gates; do not merge it wholesale without review.