Check for hash in "isValidUrl". Closes #1074.