Skip to content

Invalid links for social icons #69140

@Rishit30G

Description

@Rishit30G

Description

Currently, there is no validation mechanism to ensure that users enter a valid URL for social icons. This lack of validation can lead to issues when incorrect or improperly formatted URLs are added. To prevent potential errors, we need to implement a validation check that ensures only properly structured URLs are accepted in the input field.

Step-by-step reproduction instructions

  1. Create a new post
  2. Add 'Social Icons' block
  3. Add any social icon like 'WordPress', 'YouTube' etc
  4. Add a social link to the icon by clicking on the social icon
  5. Notice that anything can be added to the input field even when it's not a proper link

Screenshots, screen recording, code snippet

Screen.Recording.2025-02-11.at.4.45.00.PM.mov

Environment info

  • WordPress: 6.7.1
  • Gutenberg: 20.2.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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] SocialAffects the Social Block - used to display Social Media accounts[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions