Problem/Motivation

When trying to use a url withou passing it protocol like: //www.google.com the user can't save the node because valid_url() from drupal core doesn't check these URLs. SoWe could clean up and check if the URL is one of this kind to clean it up and then procced to the validations.

Proposed resolution

Create a intern function that check the url and try to clean it up

Comments

Yago Elias created an issue. See original summary.

yago elias’s picture

StatusFileSize
new1.5 KB

Status: Needs review » Needs work

The last submitted patch, 2: protocol_less_urls-2889683-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

yago elias’s picture

StatusFileSize
new2.05 KB

Probably, for passing on test, we need to exclude one URL from test.

yago elias’s picture

Status: Needs work » Needs review
renatog’s picture

Assigned: Unassigned » renatog
Status: Needs review » Reviewed & tested by the community

Hi people.

I applied the patch and works good for me.

Thank you very much for contribution @yago-elias.

Good Work.

Regards.

  • RenatoG committed a7d2015 on 7.x-1.x authored by Yago Elias
    Issue #2889683 by Yago Elias, RenatoG: Protocol-less URLs should be...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Committed in the dev branch. It's ok in next release.

Thank you very much Yago.

Good Work.

Regards.

Status: Fixed » Closed (fixed)

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