File tree 2 files changed +3
-1
lines changed
src/Symfony/Component/Validator
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class UrlValidator extends ConstraintValidator
23
23
{
24
24
const PATTERN = '~^
25
25
(%s):// # protocol
26
- (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
26
+ (([\_\ .\pL\pN-]+:)?([\_\ .\pL\pN-]+)@)? # basic auth
27
27
(
28
28
([\pL\pN\pS\-\_\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
29
29
| # or
Original file line number Diff line number Diff line change @@ -117,9 +117,11 @@ public function getValidUrls()
117
117
['http://☎.com/ ' ],
118
118
['http://username:password@symfony.com ' ],
119
119
['http://user.name:password@symfony.com ' ],
120
+ ['http://user_name:pass_word@symfony.com ' ],
120
121
['http://username:pass.word@symfony.com ' ],
121
122
['http://user.name:pass.word@symfony.com ' ],
122
123
['http://user-name@symfony.com ' ],
124
+ ['http://user_name@symfony.com ' ],
123
125
['http://symfony.com? ' ],
124
126
['http://symfony.com?query=1 ' ],
125
127
['http://symfony.com/?query=1 ' ],
You can’t perform that action at this time.
0 commit comments