Commits

Armin Ronacher committed c9edb77

url_unquote_plus now accepts unicode strings again.

  • Participants
  • Parent commits f0aacf2

Comments (0)

Files changed (3)

   error behaviour.
 - The local manager can now accept custom ident functions in the
   constructor that are forwarded to the wrapped local objects.
+- url_unquote_plus now accepts unicode strings again.
 
 Version 0.6.2
 -------------

File tests/test_urls.py

     assert base_href('../../../../foo') == 'http://www.blagga.com/foo'
     assert base_href('../../../../../foo') == 'http://www.blagga.com/foo'
     assert base_href('../../../../../../foo') == 'http://www.blagga.com/foo'
+
+
+def test_url_unquote_plus_unicode():
+    """Make sure that URL unquote plus accepts unicode."""
+    # was broken in 0.6
+    assert url_unquote_plus(u'\x6d') == u'\x6d'

File werkzeug/urls.py

     :param charset: the charset to be used.
     :param errors: the error handling for the charset decoding.
     """
+    if isinstance(s, unicode):
+        s = s.encode(charset)
     return _decode_unicode(_unquote_plus(s), charset, errors)