summaryrefslogtreecommitdiff
path: root/src/xhtml.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-06-04 20:15:18 +0200
committermathieui <mathieui@mathieui.net>2011-06-04 20:15:18 +0200
commite27c6d74ada2dbe81c41b991a26028a4d9436ee4 (patch)
treea7216ec578c92bea59316a95c35b4d647421c2af /src/xhtml.py
parentfc3f6d936dd821e66ac96e9797bc7868f8d4b4db (diff)
downloadpoezio-e27c6d74ada2dbe81c41b991a26028a4d9436ee4.tar.gz
poezio-e27c6d74ada2dbe81c41b991a26028a4d9436ee4.tar.bz2
poezio-e27c6d74ada2dbe81c41b991a26028a4d9436ee4.tar.xz
poezio-e27c6d74ada2dbe81c41b991a26028a4d9436ee4.zip
fix the display of the action 'emptying the status', and some few minor changes
Diffstat (limited to 'src/xhtml.py')
-rw-r--r--src/xhtml.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xhtml.py b/src/xhtml.py
index d755229f..16972b65 100644
--- a/src/xhtml.py
+++ b/src/xhtml.py
@@ -28,11 +28,12 @@ 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
+digits = '0123456789' # never trust the modules
+
log = logging.getLogger(__name__)
shell_colors_re = re.compile(r'(\[(?:\d+;)*(?:\d+m))')
@@ -73,9 +74,9 @@ def convert_links_to_plaintext(text):
if child.tag == '{http://www.w3.org/1999/xhtml}a':
if child.attrib['href'] != child.text:
if child.text is None and 'title' in child.attrib:
- link_text = '\n%s (%s)'%(child.attrib['href'], child.attrib['title'])
+ link_text = '\n%s (%s)' % (child.attrib['href'], child.attrib['title'])
else:
- link_text = '\n%s (%s)'%(child.attrib['href'], child.text)
+ link_text = '\n%s (%s)' % (child.attrib['href'], child.text)
else:
link_text = child.text
if previous_child is not None: