summaryrefslogtreecommitdiff
path: root/src/xhtml.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-05-13 11:46:50 +0200
committermathieui <mathieui@mathieui.net>2011-05-13 11:46:50 +0200
commit3d43517a41dfd568400cffb2e7b480cec315498f (patch)
tree714ca365753e8866d5647a17f99cbd05974eb00a /src/xhtml.py
parent2860232cc6a70894f8104474bcf8a3a861ac79ac (diff)
downloadpoezio-3d43517a41dfd568400cffb2e7b480cec315498f.tar.gz
poezio-3d43517a41dfd568400cffb2e7b480cec315498f.tar.bz2
poezio-3d43517a41dfd568400cffb2e7b480cec315498f.tar.xz
poezio-3d43517a41dfd568400cffb2e7b480cec315498f.zip
Don’t break xhtml-im
Diffstat (limited to 'src/xhtml.py')
-rw-r--r--src/xhtml.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xhtml.py b/src/xhtml.py
index d7ad522a..29017be3 100644
--- a/src/xhtml.py
+++ b/src/xhtml.py
@@ -28,6 +28,7 @@ import subprocess
from sleekxmpp.xmlstream import ET
from xml.etree.ElementTree import ElementTree
from sys import version_info
+from string import digits
from config import config
import logging
@@ -133,7 +134,7 @@ def poezio_colors_to_html(string):
if 'strong' not in opened_elements:
opened_elements.append('strong')
res += '<strong>'
- elif attr_char in string.digits:
+ elif attr_char in digits:
number = int(attr_char)
if number in number_to_color_names:
if 'strong' in opened_elements:
@@ -215,7 +216,7 @@ def poezio_colors_to_xhtml(string):
if 'strong' not in open_elements:
res += '<strong>'
open_elements.append('strong')
- elif attr_char in string.digits:
+ elif attr_char in digits:
self._win.attron(common.curses_color_pair(int(attr_char)))
next_attr_char = string.find('\x19')