Quote:
Originally Posted by Warwick
You're the man!
|
I wish it were so, but i forgot about slashes.
So "domain.com/page.php" will pass this test.
so it would be better replace
Code:
var re = new RegExp(/^(http:\/\/)?[^\.]+\.[^\.]+\.[^\.]+$/i);
with
Code:
var re = new RegExp(/^(http:\/\/)?[^\.\/]+\.[^\.\/]+\.[^\.]+$/i);