This uses the pathname property to detect if the character is a slash
<a href="https://example.com$[chr]foo" id=x></a>document.getElementById('x').pathname.includes('foo') && log($[i])<a href="https://example.com/foo" id=x></a><a href="https://example.com\foo" id=x></a>