Problem/Motivation
This was forked from #2573635: Url::fromUri() should accept protocol-relative URLs, which is where this very same thing was originally being solved. It was descoped to only add API support.
Link field only accepts external URLs with "http://" or "https://". It should also support protocol-relative URLs e.g "//example.com". Otherwise we're limiting URLs for no good reason, which is simply a Drupalism. See #2573635-44: Url::fromUri() should accept protocol-relative URLs for a longer rationale.
Proposed resolution
Allow any valid URL to be linked.
Remaining tasks
- Discuss how to handle the HTML5 validation, which by default does not accept URLs without a protocol.
- Discuss the need of the double slash at the beginning of protocol relative URLs, accepting "example.com" as a valid external URL.
User interface changes
None.
API changes
None.
Data model changes
None.