Fixed public suffix parsing potentially broken by CRLF.
This commit is contained in:
parent
be3ab16315
commit
a103af9154
|
@ -14,7 +14,7 @@ sub generate {
|
||||||
while(<DAT>) {
|
while(<DAT>) {
|
||||||
s/\./\\\./g;
|
s/\./\\\./g;
|
||||||
s/\s+utf.*//;
|
s/\s+utf.*//;
|
||||||
s/\n//;
|
s/[\r\n]//g;
|
||||||
if(/^!/) {
|
if(/^!/) {
|
||||||
s/^!//;
|
s/^!//;
|
||||||
push(@ex, lc($_));
|
push(@ex, lc($_));
|
||||||
|
@ -42,8 +42,8 @@ sub generate {
|
||||||
open(SRC, $src) || die("Cannot open $src");
|
open(SRC, $src) || die("Cannot open $src");
|
||||||
open(DST, ">$dst") || die("Cannot open $dst");
|
open(DST, ">$dst") || die("Cannot open $dst");
|
||||||
while(<SRC>) {
|
while(<SRC>) {
|
||||||
s/(_tldRx:\s*\/\(.*?\))[\s\S]*?(\$\/)/$1$rx$2/g;
|
s/(_tldRx:\s*\/\(.*?\)).*?(?=\$\/)/$1$rx/s;
|
||||||
s/(_tldEx:\s*\/\(.*?\))[\s\S]*?(\$\/)/$1$ex$2/g;
|
s/(_tldEx:\s*\/\(.*?\)).*?(?=\$\/)/$1$ex/s;
|
||||||
print DST;
|
print DST;
|
||||||
print;
|
print;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue