Re: mailcap sanitization sanitizing too much...

2021-05-25 Thread Kevin J. McCarthy

On Tue, May 25, 2021 at 11:32:32AM +0800, Philippe Meunier wrote:
So would it be possible to change the sanitization so that it restricts 
file names to Unicode alphanumeric characters (plus a few other safe 
characters) rather than just ASCII alphanumeric characters?


There was a similar request a month or so ago, and I added a couple 
commits to git master hopefully addressing this.  The Mutt 2.1 release 
should be in about three weeks, or you are welcome to try to build from 
git.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mailcap sanitization sanitizing too much...

2021-05-24 Thread Philippe Meunier
Hello,

When viewing an email attachment with mailcap, mutt sanitizes %s to contain
only ASCII alphanumeric characters, plus a few other safe characters.
Unfortunately this means that when trying to view an attachment with, say,
a Chinese or a Korean name, I end up with a file name that looks like
.jpg in my image viewer, which is not helpful.  So I often end up
having to save the attachment first, which preserves the original name,
followed by manually viewing the file, which kind of defeats the whole
purpose of using mailcap in the first place.

So would it be possible to change the sanitization so that it restricts
file names to Unicode alphanumeric characters (plus a few other safe
characters) rather than just ASCII alphanumeric characters?

(I've tried mailcap_sanitize already, but it doesn't seem to do anything
for my problem, and I don't think turning sanitization off entirely is a
good idea anyway.)

Best,

Philippe