String must be unicode for truncation to work for non ascii characters.
svn: r13178
This commit is contained in:
parent
6d14ba233c
commit
4e7df6fc71
@ -146,7 +146,7 @@ class HeadlineNewsGramplet(Gramplet):
|
|||||||
if (node2.nodeName == "item"):
|
if (node2.nodeName == "item"):
|
||||||
title = ""
|
title = ""
|
||||||
link = ""
|
link = ""
|
||||||
desc = ""
|
desc = u""
|
||||||
# Gather up the data:
|
# Gather up the data:
|
||||||
for item_node in node2.childNodes:
|
for item_node in node2.childNodes:
|
||||||
#print "---> ", item_node.nodeName
|
#print "---> ", item_node.nodeName
|
||||||
@ -186,7 +186,7 @@ class HeadlineNewsGramplet(Gramplet):
|
|||||||
|
|
||||||
def strip_html(self, text):
|
def strip_html(self, text):
|
||||||
text = text.replace("nbsp;", " ")
|
text = text.replace("nbsp;", " ")
|
||||||
retval = ""
|
retval = u""
|
||||||
last_c = None
|
last_c = None
|
||||||
state = "plain"
|
state = "plain"
|
||||||
for c in text:
|
for c in text:
|
||||||
|
Loading…
Reference in New Issue
Block a user