]> 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:42:58 +0000 (16:42 +0000)
committerlpsolit%gmail.com <>
Sat, 26 Jan 2008 16:42:58 +0000 (16:42 +0000)
email_in.pl

index 21d38ceb5b32e7dd13850b5f728d33771466a0d0..6f66105738a6e82a18c3883dd0cfea06558907e7 100644 (file)
@@ -297,7 +297,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);