diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-04-02 09:51:30 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-04-02 09:51:30 -0400 |
commit | 3ff47350b0386c971e4fb1955f87fefc2c5aafd1 (patch) | |
tree | 9371133f6080db9c72da7494a336baf45d1d7618 | |
parent | 1e0fa47194bbfcbd30e402a4897a0856a6045b73 (diff) | |
download | itstool-3ff47350b0386c971e4fb1955f87fefc2c5aafd1.tar.gz |
Handle UTF-8 in attribute values
-rwxr-xr-x | itstool.in | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -169,6 +169,8 @@ class Message (object): if prop.ns() is not None: name = prop.ns().name + ':' + name atval = prop.content + if not isinstance(atval, unicode): + atval = unicode(atval, 'utf-8') atval = atval.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') self._message += " %s=\"%s\"" % (name, atval) if node.children is not None: |