Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdomains considered invalid URLs #115

Open
mferrara opened this issue Sep 21, 2018 · 4 comments
Open

Subdomains considered invalid URLs #115

mferrara opened this issue Sep 21, 2018 · 4 comments

Comments

@mferrara
Copy link
Contributor

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?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*)$/',

@ker0x
Copy link
Owner

ker0x commented Sep 23, 2018

Hello @mferrara,

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

@mferrara
Copy link
Contributor Author

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

@ker0x
Copy link
Owner

ker0x commented Sep 30, 2018

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

@mferrara
Copy link
Contributor Author

It's thrown when calling this method...

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants