Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c603e4c

Browse filesBrowse files
bogkonstantinKonstantin Bogomolov
authored and
Konstantin Bogomolov
committed
Do not fix URL protocol for relative URLs
Example when it doesn't work correctly: /relative/path The data will be changed to "http:///relative/path" (3 slashes)
1 parent cccf5d1 commit c603e4c
Copy full SHA for c603e4c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function onSubmit(FormEvent $event)
3636
{
3737
$data = $event->getData();
3838

39-
if ($this->defaultProtocol && $data && \is_string($data) && !preg_match('~^[\w+.-]+://~', $data)) {
39+
if ($this->defaultProtocol && $data && \is_string($data) && !preg_match('~^[\w+.-]+://~', $data) && strpos($data, '/') === false) {
4040
$event->setData($this->defaultProtocol.'://'.$data);
4141
}
4242
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.