diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-06-20 00:26:23 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-06-20 00:26:23 +0200 |
commit | 3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7 (patch) | |
tree | b55c0b9a7c210a22080cbafe7d36e4fbcf697ea0 /src/xhtml.py | |
parent | 6ed46d1fe39620b776f08ce08280fac46f5929a0 (diff) | |
parent | f4c24380466fa54924a925a12817e28d603fd4d1 (diff) | |
download | poezio-3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7.tar.gz poezio-3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7.tar.bz2 poezio-3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7.tar.xz poezio-3c120b3aa23456c0a0d2ca8c7edff2f51772ddf7.zip |
merge
Diffstat (limited to 'src/xhtml.py')
-rw-r--r-- | src/xhtml.py | 7 |
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: |