Odd problem with filename passed to browser, underscores replace spaces

Kevin J. McCarthy kevin at 8t8.us
Fri Jun 12 19:41:00 UTC 2020


On Fri, Jun 12, 2020 at 11:53:24AM +0100, Chris Green wrote:
>I have a small script to handle PDF (among other) attachments which is
>called via mailcap.
>
>The mailcap entry is simply:-
>
>    application/pdf;  /home/chris/bin/muttfox %s
>
>The muttfox script gives the PDF file to firefox to be viewed.
>
>This works fine *except* when there are spaces in the filename,
>something is changing the spaces in the filename to underscores before
>the name is handed to muttfox in the %s parameter.

Mutt does this for received email attachments automatically, but the 
filename itself should have underscores too.  What do you mean by it not 
"working"?

>So what is changing the spaces to underscores?  Does mutt do it and,
>if so, is there a parameter setting to change what it does?

$mailcap_sanitize appears to be applied to %{} and %t expandos, but %s 
is always sanitized regardless of the setting.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20200612/3609e00b/attachment.asc>


More information about the Mutt-users mailing list