regexp performance issue in the method isURL (util.js)

a url ending with whitespace, for example:
'http://www123.foobar.com:6699/announce ' 
may cause the URL.test hang up, 
trying update the URL regexp to fix the issue