Handle links better

Before, links to the page could pass an encoded hash, which wouldn't be parsed correctly. With this change, it should be parsed correctly.