I have a search form that is not returning any results or is giving 404 as some of the linked queries have '%2520' in the URL such as: http://www.website.com/search/?q=some%2520keywords
I'm trying to remove the '%2520' from the query and update the request.GET
value at the same time.
This is how I was trying to go about it:
q = { 'q': request.GET.get('q') }
urllib.urlencode(q)
request.GET = request.GET.copy()
request.GET.update(q)
form = form_class(request.GET, searchqueryset=searchqueryset, load_all=load_all)
So far no luck. What am I missing?