fix URL validity check for Chrome