fixed str.decode

This commit is contained in:
Andreas Preikschat 2013-07-03 19:10:37 +02:00
parent ba462d321b
commit 08f47c4a49

View File

@ -156,15 +156,10 @@ class FormattingTags(object):
u'end html': u'', u'protected': True, u'temporary': False}) u'end html': u'', u'protected': True, u'temporary': False})
FormattingTags.add_html_tags(base_tags) FormattingTags.add_html_tags(base_tags)
FormattingTags.add_html_tags(temporary_tags) FormattingTags.add_html_tags(temporary_tags)
# Formatting Tags were also known as display tags.
user_expands_string = str(Settings().value(u'formattingTags/html_tags')) user_expands_string = str(Settings().value(u'formattingTags/html_tags'))
# If we have some user ones added them as well
if user_expands_string: if user_expands_string:
user_tags = json.loads(user_expands_string) user_tags = json.loads(user_expands_string)
for tag in user_tags:
for element in tag:
if isinstance(tag[element], str):
tag[element] = tag[element].decode('utf8')
# If we have some user ones added them as well
FormattingTags.add_html_tags(user_tags) FormattingTags.add_html_tags(user_tags)
@staticmethod @staticmethod