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

Update link selector to format links automatically #100

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

AidanDaniel97
Copy link
Contributor

The link selector is working correctly, as it's currently set to type="url" however Notion has this set to type="text" meaning browser validation isn't run on the input to check it is a valid URL. This means in notion typing google.com will link to http://google.com and allow the domain to handle http > https redirection. I have added a snippet to the form submission which will trim the string and then append http:// if it doesn't start with it already as well as changing the type to text on the input field.

This may be a personal preference and is not exactly the desired functionality.

The link selector is working correctly, as it's currently set to type="url" however Notion has this set to type="text" meaning browser validation isn't run on the input to check it is a valid URL. This means in notion typing google.com will link to http://google.com and allow the domain to handle http > https redirection. I have added a snippet to the form submission which will trim the string and then append http:// if it doesn't start with it already as well as changing the type to text on the input field.
@vercel
Copy link

vercel bot commented Jul 20, 2023

@AidanDaniel97 is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.

@steven-tey
Copy link
Owner

Fantastic idea! Replaced this with a utility function I used in https://github.com/steven-tey/dub but other than that, LGTM! Thank you!

@steven-tey steven-tey merged commit f476d82 into steven-tey:main Aug 9, 2023
1 of 3 checks 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.

None yet

2 participants