python-html2text/aaronsw-html2text-remove-newlines.patch
Michael Schwendt 7f193c204a Merge "remove-newlines" (from alt tags) patch (Debian #299027).
- Include html2text script as python-html2script.
- Minor spec cleanup.
2013-02-19 12:12:30 +01:00

11 lines
557 B
Diff

diff -Nur aaronsw-html2text-c368b14-orig/html2text.py aaronsw-html2text-c368b14/html2text.py
--- aaronsw-html2text-c368b14-orig/html2text.py 2012-01-07 16:01:09.000000000 +0100
+++ aaronsw-html2text-c368b14/html2text.py 2013-02-19 11:53:09.609134393 +0100
@@ -479,6 +479,7 @@
if has_key(attrs, 'src'):
attrs['href'] = attrs['src']
alt = attrs.get('alt', '')
+ alt = re.sub('\n', ' ', alt)
if self.inline_links:
self.o("![")
self.o(alt)