- Issue created by @mlncn
A person putting a "URL" into their web browser's address bar has been able to skip the protocol (http or https) for a decade or more. News broadcasts providing a URL likewise start with the domain or subdomain. People do not ordinarily think of the protocol as a necessary part of a web address because for all practical purposes it is not— until they come to Drupal and add a link, and Drupal blocks submission of their content with the clientside, HTML validation: "Please enter a URL."
example.com
.Change the HTML input
element to not be type="url"
(unless there's some way around the clientside HTML validation).
On submission, if there is no protocol included, test the link with https://
prepended, giving at most a second to respond, and use http://
as what we prepend.
Provide a message, "We added the protocol (http://) to the link you provided to make a valid URL. An https protocol is preferable but we could not verify that SSL worked for the web address provided."
Or something less wordy. The latter part would only be stated if https did not work.
Oh, just realizing it would be much better to leave the input element as type URL and do all of this in JavaScript.
Active
1.0
Code