summaryrefslogtreecommitdiff
path: root/scripts/buildtable.pl
diff options
context:
space:
mode:
authorLuke Dashjr <luke_github1@dashjr.org>2022-05-05 15:03:29 +0000
committerGitHub <noreply@github.com>2022-05-05 15:03:29 +0000
commit31a496fc245e3d8b433962013da4661951f3e440 (patch)
tree8b2a1a42b7122c24b37aefbaa6ccfbcc998d0b20 /scripts/buildtable.pl
parent3d70fafaab6c53b7095f0bc47097e1e2d4246867 (diff)
parent234bb915f41f85eb8e9845bab5349fb2eec83246 (diff)
downloadbips-31a496fc245e3d8b433962013da4661951f3e440.tar.xz
Merge pull request #1299 from ajtowns/202204-longtitle
bip-326: avoid errors from scripts/buildtable.pl
Diffstat (limited to 'scripts/buildtable.pl')
-rwxr-xr-xscripts/buildtable.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/buildtable.pl b/scripts/buildtable.pl
index 1edd8c0..0225632 100755
--- a/scripts/buildtable.pl
+++ b/scripts/buildtable.pl
@@ -89,7 +89,7 @@ my %DefinedLicenses = (
);
my %GrandfatheredPD = map { $_ => undef } qw(9 36 37 38 42 49 50 60 65 67 69 74 80 81 83 90 99 105 107 109 111 112 113 114 122 124 125 126 130 131 132 133 140 141 142 143 144 146 147 150 151 152);
my %TolerateMissingLicense = map { $_ => undef } qw(1 10 11 12 13 14 15 16 21 31 33 34 35 39 43 44 45 47 61 64 68 70 71 72 73 101 102 106 120 121);
-my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173);
+my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173 326);
my %emails;
@@ -127,7 +127,10 @@ while (++$bipnum <= $topbip) {
my $title_len = length($title);
die "$fn has too-long TItle ($title_len > 44 char max)" if $title_len > 44 and not exists $TolerateTitleTooLong{$bipnum};
} elsif ($field eq 'Author') {
- $val =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.]+\.\w+)\>$/ or die "Malformed Author line in $fn";
+ my $deantispam = $val;
+ $deantispam =~ s/ at /@/;
+ $deantispam =~ s/ dot /./g;
+ $deantispam =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.]+\.\w+)\>$/ or die "Malformed Author line in $fn";
my ($authorname, $authoremail) = ($1, $2);
$authoremail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g;
$emails{$authorname}->{$authoremail} = undef;