carlxaeron / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

Bug: not proper encoded search string in query string results in 500 Http Error #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. search in Rosetta for string with non-ascii character
2. then save changes in translations
3. redirect after save get
'ascii' codec can't encode character u'\xe1' in position 16: ordinal not in 
range(128), HTTP response headers must be in US-ASCII format

What is the expected output? What do you see instead?
Proper redirect with search string in query string.

What version of the product are you using? On what operating system?
revision 68.

Please provide any additional information below.

If you handle query parameters you must proper encode them by 
django.utils.encoding.iri_to_uri():

return HttpResponseRedirect(reverse('rosetta-home') + 
iri_to_uri(query_arg))

Original issue reported on code.google.com by vsto...@gmail.com on 24 Jul 2009 at 3:31

GoogleCodeExporter commented 8 years ago
Well spotted, thank you. This is fixed as of r70.

Original comment by mbonetti on 28 Jul 2009 at 3:36