]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 413672: email_in.pl incorrectly rejects quoted charsets - Patch by Frédéric...
authorlpsolit%gmail.com <>
Sat, 26 Jan 2008 16:41:13 +0000 (16:41 +0000)
committerlpsolit%gmail.com <>
Sat, 26 Jan 2008 16:41:13 +0000 (16:41 +0000)
email_in.pl

index 02d00a3e215c3bab6cb42304c3e12e5837c7cd07..ca7a297350629a1b7f430de4cdf2b67bafad6080 100644 (file)
@@ -294,7 +294,8 @@ sub get_text_alternative {
     foreach my $part (@parts) {
         my $ct = $part->content_type || 'text/plain';
         my $charset = 'iso-8859-1';
-        if ($ct =~ /charset=([^;]+)/) {
+        # The charset may be quoted.
+        if ($ct =~ /charset="?([^;"]+)/) {
             $charset= $1;
         }
         debug_print("Part Content-Type: $ct", 2);