Fixing crash on certain searches

Specifically those that return a link that are not on /wiki/<title>,  and have no query.