handle hashes when checking for links