about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/WwwAttach.pm2
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