On 2010-07-13, Erik Christiansen wrote:
> Most URLs arriving in html messages are eminently discardable, but today
> I received one worth trying. Mutt's autoview invokes w3m, which extracts
> most of the html text, but renders the URL as nothing more than '*'.
> 
> There are three matching lines in /etc/mailcap:
> text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; 
> nametemplate=%s.html
> text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; description=HTML 
> Text; nametemplate=%s.html
> text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; 
> description=HTML Text; nametemplate=%s.html
> 
> OK, since I'm in mutt, one keystroke opens the message in vim, and the
> offending URL is revealed. It was spread over 5 lines, with a trailing
> '=' on the first 4 serving as continuation escape. I deleted them, and
> joined the lines. Also converting 15 occurrences of "=3D" to '=' allowed
> the URL to be used in firefox.
> 
> It won't take me many minutes to point /etc/mailcap at a simple shell
> script which invokes a few lines of awk to perform the repair, before
> piping to w3m to finish off, but I'm very curious to know what other
> mutters do with something like that.
> 
> The sender seems to consider the message standards compliant, because
> this:
> 
> <html xmlns=3D"http://www.w3.org/1999/xhtml";>
> 
> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8"
> =
> />
> 
> appears early in the message.
> 
> I had thought that "=3D" was a m$-ism?

The "=" at the end of the line and "=3D" stuff is quoted-printable,
a type of Content-Transfer-Encoding defined by RFC 2045.  Mutt
already knows how to deal with that and decodes it before piping the
result to w3m.

Is the URL in the text of the message, or is it embedded within an
<A tag?  Posting the problematic URL with a few lines of context may
help us see the problem better.

What happens if you open the attachment in the attachment menu?
That will use w3m to display the message instead of just using w3m
as a filter.  Do you see the "*" as a link?

Regards,
Gary

Reply via email to