Escape the query when it to the fragment.