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

Link UI creates invalid URIs #47414

Open
draganescu opened this issue Jan 25, 2023 · 5 comments
Open

Link UI creates invalid URIs #47414

draganescu opened this issue Jan 25, 2023 · 5 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended

Comments

@draganescu
Copy link
Contributor

Description

When editing the link format of some text it is easy to end up with an invalid link. The component should not append protocols unless the data looks like an URL.

Step-by-step reproduction instructions

  1. Add a paragraph
  2. Add some text inside the paragraph
  3. Select some of the text
  4. Click the link format button in the block toolbar
  5. In the link UI's search field type "asdasd"
  6. Click Apply
  7. Notice the link is now "https://asdasd"

Screenshots, screen recording, code snippet

bad-link.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@draganescu draganescu added [Type] Bug An existing feature does not function as intended [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels Jan 25, 2023
@getdave
Copy link
Contributor

getdave commented Jun 6, 2023

Is this resolved by #51011 ?

@draganescu
Copy link
Contributor Author

Not in my testing:

link-protocol.mp4

@abhi3315
Copy link
Contributor

I'm taking up this issue.

@getdave
Copy link
Contributor

getdave commented Aug 29, 2023

What it would be good to see is:

  1. Validation
  2. Human perceivable messages indicating the validation state.

@MichaelSalp
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants