diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-06-18 11:55:21 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-06-18 11:55:21 +0200 |
commit | e56b8d9853bae436ccd2845ae63c6b30fa628cad (patch) | |
tree | 2cabab2cc990670790c93a8d39892fe2bbdfbdff /src/xhtml.py | |
parent | 63db93c9992f41283002a7034ce610ae75736a58 (diff) | |
parent | dd9186c72a04f449c427bce31d35a283f3c61c25 (diff) | |
download | poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.gz poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.bz2 poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.tar.xz poezio-e56b8d9853bae436ccd2845ae63c6b30fa628cad.zip |
Merge, j'ai rien compris
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: |