Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links with Text Fragments risk to get parsed incorrectly #327

Open
tomayac opened this issue Jun 19, 2020 · 2 comments
Open

Links with Text Fragments risk to get parsed incorrectly #327

tomayac opened this issue Jun 19, 2020 · 2 comments

Comments

@tomayac
Copy link

tomayac commented Jun 19, 2020

One line summary of the issue here.

Links with Text Fragments risk to get parsed incorrectly.

Expected behavior

Try to share:

https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting#wikiArticle:~:text=Use%20this%20method%20with%20Clients.claim()%20to,client%20and%20all%20other%20active%20clients.

Actual behavior

This gets parsed as:

https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting#wikiArticle:~:text=Use%20this%20method%20with%20Clients.claim (only up until the parentheses)

Screen Shot 2020-06-19 at 14 43 00

(Source tweet)

Note that parentheses are fine to exist in URLs:

encodeURIComponent('(')
// '('

Expected behavior

The link to get completely parsed. A pattern to look for in URLs would be :~:text=.

@tomayac
Copy link
Author

tomayac commented Jun 19, 2020

When testing Text Fragments URLs, recall that t.co links don't work with text fragments due to crbug.com/1055455.

@comp615
Copy link

comp615 commented Jun 19, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants