getkirby-v2 / toolkit

This is the deprecated toolkit for Kirby v2.
http://getkirby.com
81 stars 50 forks source link

Localhost URL Validation Issue #255

Closed afbora closed 7 years ago

afbora commented 7 years ago

https://github.com/getkirby/toolkit/blob/4720c7584f770004e1c20ca6bb03183fce52ad66/lib/v.php#L134

Above URL regex validation doesnt working for localhost like that:

http://localhost/test/ > FALSE
http://www.localhost/test/ > TRUE
http://www.google.com > TRUE

Kirby 2.5.5 Version

lukasbestle commented 7 years ago

Please read the comment above that line. There just isn't a proper validation regex that works for every kind of URL. I have noted this down for Kirby 3, we will try to find a better way of validating URLs than using a regex.