[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-users
Subject:    Re: Odd problem with filename passed to browser, underscores replace spaces
From:       Chris Green <cl () isbd ! net>
Date:       2020-06-12 21:22:15
Message-ID: 20200612212215.GA6390 () esprimo
[Download RAW message or body]

On Fri, Jun 12, 2020 at 12:41:00PM -0700, Kevin J. McCarthy wrote:
> 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.
> 
Ah, thank you, that "%s is always sanitised" helps somewhat.  It at
least explains why I don't get the expected filename.

It turned out that my issue was a bit further down the line in the way
Firefox handled it (misconfiguration on my part basically).  The
change of spaces to underscores was just confusing me.

-- 
Chris Green
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic