Use URI::uri_(un)escape for search terms, works well for fragments.