messenger icon indicating copy to clipboard operation
messenger copied to clipboard

Subdomains considered invalid URLs

Open mferrara opened this issue 5 years ago • 4 comments

I'd fix this myself and submit a pull request but I'm not very handy with regex and wouldn't want to muck things up...

I'm running into situations where urls with subdomains are coming back as invalid URLs from the isValidUrl method linked below - is this intended?

https://github.com/ker0x/messenger/blob/6bc832af94fb48b8f2edefb11b85f6bf47d7c09e/src/Helper/ValidatorTrait.php#L49

mferrara avatar Sep 21 '18 23:09 mferrara

Hello @mferrara,

Can you provide an example of a sub-domain that does not pass validation?

ker0x avatar Sep 23 '18 11:09 ker0x

Gladly! - https://jjlynboutique.espwebsite.com

mferrara avatar Sep 27 '18 11:09 mferrara

Well, it's weird, all the tests I did with your url are validated. By calling which method the validation fails?

ker0x avatar Sep 30 '18 15:09 ker0x

It's thrown when calling this method...

$buttons[] = WebUrl::create($button_text, $button_action);

mferrara avatar Nov 16 '18 13:11 mferrara