#13572: QueryDict.copy().encoding is not set correctly
------------------------------------------------+---------------------------
Reporter: adammck | Owner: nobody
Status: new | Milestone:
Component: Uncategorized | Version: SVN
Keywords: querydict, mutable, copy, encoding | Stage: Unreviewed
Has_patch: 1 |
------------------------------------------------+---------------------------
When !QueryDict.copy() is called, a new (mutable) querydict is returned,
but its 'encoding' attr is not set. This results in the copy being re-
encoded wrongly. For example, this works correctly:
{{{
>>> q = QueryDict('foo=bar', encoding='rot_13')
>>> q.encoding, q.urlencode()
('foo=bar', 'rot_13')
}}}
But this is clearly wrong:
{{{
>>> q = QueryDict('foo=bar', encoding='rot_13').copy()
>>> q.encoding, q.urlencode()
('sbb=one', 'utf-8')
}}}
Oops! Patch attached, and regression tests which better illustrate the
problem.
--
Ticket URL: <http://code.djangoproject.com/ticket/13572>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.