Handle case of multiple hashes in url

Sometimes you can have more than one hash character in the link, for example in an angular app.