]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
import: drop '<' and '>' characters in addresses
[public-inbox.git] / lib / PublicInbox / Import.pm
index d279fea1a43f25a823cd168801cc82bc24034e13..68dc0c7e83c1b223796ee171200d879065e1add2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # git fast-import-based ssoma-mda MDA replacement
@@ -293,6 +293,10 @@ sub extract_cmt_info ($) {
                }
        }
        if (defined $email) {
+               # Email::Address::XS may leave quoted '<' in addresses,
+               # which git-fast-import doesn't like
+               $email =~ tr/<>//d;
+
                # quiet down wide character warnings with utf8::encode
                utf8::encode($email);
        } else {