]> Sergey Matveev's repositories - public-inbox.git/commitdiff
address: remove quotes around names
authorEric Wong <e@80x24.org>
Mon, 20 Jun 2016 03:17:11 +0000 (03:17 +0000)
committerEric Wong <e@80x24.org>
Mon, 20 Jun 2016 03:17:11 +0000 (03:17 +0000)
They're needless for actual display once outside of email
headers.  But we will still show them when displaying mock
headers in the permalink view.

lib/PublicInbox/Address.pm

index 8b3daf50974d3a26ed39829070db0ad23c3e3e01..772adedb29b3ed1546a647181a31609e5f3d7766 100644 (file)
@@ -18,7 +18,8 @@ sub from_name {
                $name =~ s/\@.*//;
        }
        $name =~ tr/\r\n\t/ /;
-       $name =~ s/\A\s*//;
+       $name =~ s/\A['"\s]*//;
+       $name =~ s/['"\s]*\z//;
        $name;
 }