Stored link value should be normalized

Created on 17 September 2012, about 12 years ago
Updated 31 August 2024, 28 days ago

The stored value of a link should be a full-fledged, sanitized URL. This is not just a pure theoretical consideration about consistency, but the Link module is the expert for preparing link data and telling links apart. All data stored by the module should be normalized, thus well-formed, standards-compliant and comparable.

The Unique Field module provides a good real world example for how important that is. That module ensures there is no other node with the same content . It doesn't work reliable with the Link module, because the same link can have (at least) two representations: "www.example.com" and "http://www.example.com".

I don't know much about the internals of the Link module, but I guess passing the URL field value through _link_sanitize() when receiving a form would be a first attempt.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    I'll close this issue due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025. While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here.

Production build 0.71.5 2024