You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is normal to use links without absolute protocol, just: //symfony.com
After following a link without a protocol (only with double slashes), browsers will automatically detect the protocol. So it is correct to use these links. Try and see: //symfony.com
But Symfony Form UrlType adds a default protocol to these URLs (//symfony.com => http:////symfony.com).
How to reproduce
Paste //symfony.com to Form UrlType, submit the form and see what happens.
Possible Solution
In Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener
Find:
if ($this->defaultProtocol && $data && \is_string($data) && !preg_match('~^[\w+.-]+://~', $data)) {