Why? This seems to be broken by design (I can construct invalid urls that match and find valid urls that don't. What's the idea behind this expression, why is it necessary?
And looking at the code it just seems to prepend 'http:// to the url if it doesn't match this expression?
What's the reason for the valid_url_pattern in shortener.js?
/https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/
Why? This seems to be broken by design (I can construct invalid urls that match and find valid urls that don't. What's the idea behind this expression, why is it necessary?
And looking at the code it just seems to prepend 'http:// to the url if it doesn't match this expression?