From 4e7df6fc7165ffcd5f4f06bed7ad7e407b966fae Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Tue, 8 Sep 2009 13:37:48 +0000 Subject: [PATCH] String must be unicode for truncation to work for non ascii characters. svn: r13178 --- src/plugins/gramplet/HeadlineNewsGramplet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/gramplet/HeadlineNewsGramplet.py b/src/plugins/gramplet/HeadlineNewsGramplet.py index 37f3db5e9..7fce1675b 100644 --- a/src/plugins/gramplet/HeadlineNewsGramplet.py +++ b/src/plugins/gramplet/HeadlineNewsGramplet.py @@ -146,7 +146,7 @@ class HeadlineNewsGramplet(Gramplet): if (node2.nodeName == "item"): title = "" link = "" - desc = "" + desc = u"" # Gather up the data: for item_node in node2.childNodes: #print "---> ", item_node.nodeName @@ -186,7 +186,7 @@ class HeadlineNewsGramplet(Gramplet): def strip_html(self, text): text = text.replace("nbsp;", " ") - retval = "" + retval = u"" last_c = None state = "plain" for c in text: