Url is not parsed properly?
luc2016 opened this issue · 2 comments
luc2016 commented
if url doesn't contains 'http://', uri_parse(url)
will return nil, and check_url
will throw an error.
[1] pry(#<Pages::Home>)> path='google.com'
=> "google.com"
[2] pry(#<Pages::Home>)> uri_parse(path)
=> nil
[3] pry(#<Pages::Home>)> path='http://google.com'
=> "http://google.com"
[4] pry(#<Pages::Home>)> uri_parse(path)
=> "google.com"
The consequence is if we specify our URL as google.ca
rather than http://google.ca
, the loaded?
method won't work.
azohra commented
we need to decide if we want to allow incorrect URI's into the method.
azohra commented
closing as we have agreed to not allow incorrect URI's