Fixed bug where search queries couple produce improperly escaped urls resulting in bad links by using the urlquote function to escape special characters when building parameter links. There may be other instances of this bug elsewhere, but these were the most severe and obvious incarnations.