Issue Bug Closed

#73805Remove duplicate protocol from External URLs

Tomas Norre Mikkelsen 03/01/16, 14:01 updated 09/08/17, 21:12

Description

We have found the problem with page-type: External URL.

Scenario:
When choosing a protocol and add a url with protocol to like:

Protocol: http://
URL: https://www.google.com

Then the result will be:
http://https//www.google.com

The UX of these fields imply that uses should not add a protocol to the URL field, but it can happen, and we want to give the user the best possibility to not break there links.
Normal user behaviour would be just to copy/paste the link from somewhere, which would logically already include protocol, and therefor the editor would not think of removing it from the URL field.

So we have two suggestions and would like to discuss them before implementing, so that we take the right path from the beginning and more likely get it merged into master.

Solution A)

  • Use Auto as default protocol
  • Change the Label of “Protocol”-field to “Force Protocol“
    AC:
  • If Auto is select and URL starts with / (e.g.) /home handle as todays behaviour
  • If protocol set in URL and no “Force Protocol” is selected, link to what ever url in URL field, and respect the protocol set there.
  • If protocol set in URL and “Force Protocol” (e.g.) https:// is selected, keep the URL as http://www.google.com but force the link rendering to be https://www.google.com by switching the protocol in frontend rendering
  • If protocol not set in URL and “Auto” (protocol) is selected in “Force Protocol”, http:// is fallback protocol.
Solution B)
  • Add a validation on Url field.
    AC:
  • If Protocol set in URL, Show Flash Messages and strip the protocol from the URL field

We think the effort of implementing is equal, but we would like to discuss the solution before implementing A or B, or perhaps even C – Inputs are welcome.
We are happy to do the implementation when the direction of the implementation is decided.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.