Permalink
Browse files

[bug 695553] Encode search cookie values

  • Loading branch information...
James Socol
James Socol committed Oct 18, 2011
1 parent 95f2a99 commit f31ab639405a9157f84a3ae73a819f265086ca33
Showing with 1 addition and 1 deletion.
  1. +1 −1 apps/search/views.py
View
@@ -382,7 +382,7 @@ def search(request, template=None):
results_['Expires'] = (datetime.utcnow() +
timedelta(minutes=settings.SEARCH_CACHE_PERIOD)) \
.strftime(expires_fmt)
- results_.set_cookie(settings.LAST_SEARCH_COOKIE, cleaned['q'],
+ results_.set_cookie(settings.LAST_SEARCH_COOKIE, cleaned['q'].encode('utf-8'),
max_age=3600, secure=False, httponly=False)
return results_

0 comments on commit f31ab63

Please sign in to comment.