Remove newlines.
authorDavid Watson <dwatson@debian.org>
Mon, 18 Feb 2013 18:49:25 +0000 (19:49 +0100)
committerMatěj Cepl <mcepl@redhat.com>
Mon, 18 Feb 2013 19:14:05 +0000 (20:14 +0100)
html2text.py

index 0ed4cecd8d1ff3a5638e5c6fb92096f22d8a3f16..1cd51945a4688d3958a7fe31d48141cb9c677fc9 100644 (file)
@@ -305,6 +305,7 @@ class _html2text(HTMLParser.HTMLParser):
             if has_key(attrs, 'src'):
                 attrs['href'] = attrs['src']
                 alt = attrs.get('alt', '')
+                alt = re.sub('\n', ' ', alt)
                 i = self.previousIndex(attrs)
                 if i is not None:
                     attrs = self.a[i]