Problem/Motivation

Most of plugins are providing URL prefixes, like Facebook. In such cases the use should enter only the relative part. But it's likely that in a lot of cases the users are tempted to copy and paste the URL of their profile directly from the browser. This could lead to a Facebook link, such as: https://www.facebook./com/https://facebook.com/myprofile.

Proposed resolution

Add a generic validation in \Drupal\social_media_links\PlatformBase::validateValue() for such cases to detect such user input attempts.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

FileSize
1.09 KB

Patch.

claudiu.cristea’s picture

Status: Active » Needs work
FileSize
1.09 KB
859 bytes

Fix a tiny typo.

claudiu.cristea’s picture

Status: Needs work » Needs review
Omar Alahmed’s picture

Status: Needs review » Reviewed & tested by the community

#3 Works perfectly for me. Thanks @claudiu.cristea

Neslee Canil Pinto’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.