changeset 3336:fb0f0f3ef115

wiki parser: allow arbitrary unicode link parameters We need to convert the attributes to 'str' because the code requires this, but in that case it doesn't matter since they come from a valid list that contains only strings. In the arbitrary GET parameter case, however, we should allow unicode.
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 19 Mar 2008 13:30:56 +0100
parents 4bccb8c29219
children 6049339db18f
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Wed Mar 19 13:22:25 2008 +0100
+++ b/MoinMoin/parser/text_moin_wiki.py	Wed Mar 19 13:30:56 2008 +0100
@@ -656,12 +656,11 @@
                 acceptable_attrs = []
             for key, val in kw.items():
                 # wikiutil.escape for key/val must be done by (html) formatter!
-                key = str(key) # we can't use unicode as key ...
                 if key in acceptable_attrs:
-                    tag_attrs[key] = unicode(val) # ... but for the value
+                    # tag attributes must be string type
+                    tag_attrs[str(key)] = val
                 elif key.startswith('&'):
                     key = key[1:]
-                    val = unicode(val)
                     query_args[key] = val
         return tag_attrs, query_args