From f88c404d597ed52e6f84e1b1257cc23d1706148a Mon Sep 17 00:00:00 2001 From: David Watson Date: Mon, 18 Feb 2013 19:49:25 +0100 Subject: [PATCH] Remove newlines. --- html2text.py | 1 + 1 file changed, 1 insertion(+) diff --git a/html2text.py b/html2text.py index 0ed4cec..1cd5194 100644 --- a/html2text.py +++ b/html2text.py @@ -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] -- 2.26.2