Martin Michlmayr wrote:
> I just got the following from rss2email:
> 
> > ![Martin
> > wearing a plant crown][1]  
> > After the conference on Monday, ...
> > URL: http://www.cyrius.com/journal/2005/03/01#another-crown-scorpion
> 
> The problem here is that the ALT tag of the image is split across two
> lines even there is really no reason to do that.  While I split it
> across two lines in the HTML, I don't think rss2email should display
> the newline.  At least lynx doesn't.

I do think I've seen this effect used for ascii art in alt tags. Not a
good idea or portable of course. 

Here's a very simple patch to avoid it (pardon my crummy python coding):

Index: html2text.py
===================================================================
--- html2text.py        (revision 11107)
+++ html2text.py        (working copy)
@@ -260,6 +260,7 @@
                        if attrs.has_key('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]

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to