changeset 4668:7ee24547de7d

fix url_unquote - we sometimes call it with unicode
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 29 Mar 2009 15:33:59 +0200
parents 6fcf0c534ca7
children d9f18ecbb2c4
files MoinMoin/wikiutil.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Sun Mar 29 14:00:13 2009 +0200
+++ b/MoinMoin/wikiutil.py	Sun Mar 29 15:33:59 2009 +0200
@@ -112,6 +112,8 @@
         assert want_unicode is None
     except AssertionError:
         log.exception("call with deprecated want_unicode param, please fix caller")
+    if isinstance(s, unicode):
+        s = s.encode(config.charset)
     return werkzeug.url_unquote(s, charset=config.charset, errors='fallback:iso-8859-1')