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

fix: some invalid url wrongly detected by anchorme #3186

Merged
merged 2 commits into from
May 17, 2021
Merged

Conversation

UncleBill
Copy link
Contributor

url like https://…a.com. see alexcorvi/anchorme.js/issues/109

closes #3185

Comment on lines 6 to 13
.filter((y) => {
try {
new URL(y)
return true
} catch {
return false
}
})
Copy link
Contributor

@septs septs May 16, 2021

Choose a reason for hiding this comment

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

plz extract this snippet as function, .filter(isValidURL)

Copy link
Member

Choose a reason for hiding this comment

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

I think we're ok with this as a temporary fix

@UncleBill UncleBill requested a review from septs May 16, 2021 07:15
@guanbinrui guanbinrui merged commit ad6a8bf into master May 17, 2021
@guanbinrui guanbinrui deleted the fix/url-parsing branch May 17, 2021 01:28
guanbinrui pushed a commit that referenced this pull request May 17, 2021
* fix: some invalid url wrongly detected by anchorme

url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109

closes #3185

* Update packages/shared/src/utils/parseURL.ts

Co-authored-by: Jack Works <[email protected]>

Co-authored-by: Jack Works <[email protected]>
guanbinrui pushed a commit that referenced this pull request May 19, 2021
* fix: some invalid url wrongly detected by anchorme

url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109

closes #3185

* Update packages/shared/src/utils/parseURL.ts

Co-authored-by: Jack Works <[email protected]>

Co-authored-by: Jack Works <[email protected]>
guanbinrui pushed a commit that referenced this pull request May 19, 2021
* fix: some invalid url wrongly detected by anchorme

url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109

closes #3185

* Update packages/shared/src/utils/parseURL.ts

Co-authored-by: Jack Works <[email protected]>

Co-authored-by: Jack Works <[email protected]>
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.

[Bug] [Collectible] Fails to parse url created by aaa the URL Lengthener.
4 participants