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

Add https:// to beginning of button links if not already present #46385

Closed
eoinsav opened this issue Dec 7, 2022 · 0 comments · Fixed by #47311
Closed

Add https:// to beginning of button links if not already present #46385

eoinsav opened this issue Dec 7, 2022 · 0 comments · Fixed by #47311
Assignees
Labels
[Block] Buttons Affects the Buttons Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.

Comments

@eoinsav
Copy link

eoinsav commented Dec 7, 2022

Description

When adding a link to the Buttons Block, it expects http:// or https:// at the start of a URL.

Say we are adding a Button to myfirstdomain.com, if the link is added as myseconddomain.com (or www.myseconddomain.com) then it will be displayed on the frontend as myfirstdomain.com/myseconddomain.com (or myfirstdomain.com/www.myseconddomain.com).

It works correctly for a regular text link. It will automatically add http:// to the beginning of a link in a Paragraph Block (sort of related).

Step-by-step reproduction instructions

  1. Create a Page
  2. Add a Buttons Block
  3. Type a link without http:// or https://
  4. Publish the Page
  5. Click the button on the published Page

Environment info

  • WordPress Version 6.1.1
  • Gutenberg Version 14.7.0

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

@eoinsav eoinsav changed the title Add https:// to beginning of button links if not present Add https:// to beginning of button links if not already present Dec 8, 2022
@kathrynwp kathrynwp added [Type] Enhancement A suggestion for improvement. [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Block] Buttons Affects the Buttons Block labels Dec 12, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 20, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants