diff options
author | Eric Wong <e@80x24.org> | 2019-06-04 02:04:27 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-04 10:06:18 +0000 |
commit | f8c8ca04d47620d390092000ca09aab071442fac (patch) | |
tree | c8289b8facfc88ac8436165a964a9a1f586419ab /lib/PublicInbox | |
parent | fc483fde5dc78d7e6b230527e375c5f421997565 (diff) | |
download | public-inbox-f8c8ca04d47620d390092000ca09aab071442fac.tar.gz |
AFAIK all names of charsets are ASCII, so passing non-ASCII characters from emails to clients would probably confuse clients.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/WwwAttach.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/WwwAttach.pm b/lib/PublicInbox/WwwAttach.pm index d690ce41..96103cb0 100644 --- a/lib/PublicInbox/WwwAttach.pm +++ b/lib/PublicInbox/WwwAttach.pm @@ -27,7 +27,7 @@ sub get_attach ($$$) { if ($ct && (($ct->{discrete} || '') eq 'text')) { # display all text as text/plain: my $cset = $ct->{attributes}->{charset}; - if ($cset && ($cset =~ /\A[\w-]+\z/)) { + if ($cset && ($cset =~ /\A[a-zA-Z0-9_\-]+\z/)) { $res->[1]->[1] .= qq(; charset=$cset); } } else { # TODO: allow user to configure safe types |