U4-2924 - Related Links Data Type Mangles Absolute/Schemaless/MailTo/Tel/JavaScript URL's

Created by Nicholas Westby 24 Sep 2013, 17:20:16 Updated by Shannon Deminick 21 Jun 2017, 07:58:15

Relates to: U4-844

The related links data type in Umbraco allows you to pick either internal or external URL's. The internal URL's are chosen with a picker, and the external URL's allow you to type in a URL. However, the data type prefixes "http://" to external URL's overzealously. For example, here are examples where it produces an incorrect URL...

/some/page?query=string produces http:///some/page?query=string //www.google.com/ produces http:////www.google.com/ user@domain.com produces http://mailto:user@domain.com tel:5555555555 produces http://tel:5555555555 javascript:undefined; produces http://javascript:undefined;

Those are all valid URL's without modification (i.e., prefixing), and they are known respectively as: absolute path, schemaless URL, MailTo URL, phone URL, and JavaScript URL. I haven't tried relative URL's, but I'm guessing those break too. There may be others I am not thinking of too (e.g., custom schemas, such as the one iTunes uses to open a song in iTunes).

I propose that the related links data type be modified to either not prefix anything to external URL's, or be modified to add a third type of link (e.g., "Verbatim URL").

By the way, it'd be nice to be able to suffix a query string/hash to the end of an internal URL (that's more of a feature request than a bug, but thought I'd mention it in case anybody feels like tackling that when they fix the bug).

Comments

Funka! 24 Sep 2013, 22:05:14

Note, take a look at the "Multi-Url Picker" data type from the uComponents package. There is currently a movement to get this included into the Umbraco Core over at U4-844 if you wanted to see the progress on this. It fixes several problems with and seems to do everything that Related Links does, and more. Good luck!


Nicholas Westby 25 Sep 2013, 15:02:43

If a better alternative to related links is available, this would be mostly unnecessary.


Shannon Deminick 21 Jun 2017, 07:58:15

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.3

Due in version:

Sprint:

Story Points:

Cycle: