Skip to content

Commit 05dd9ee

Browse files
committed
links.php: ease UrlTester::isExcludedUrl usage
1 parent 3c19be4 commit 05dd9ee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/links/links.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,12 +1154,20 @@ public function mustUseCurl(TestableUrl $testableUrl): bool
11541154

11551155
public function isExcludedUrl(TestableUrl $testableUrl): bool
11561156
{
1157-
$url = self::formatUrl($testableUrl->getSolvedUrl());
1157+
$url = $testableUrl->getUrl();
11581158
foreach ($this->exclusionTests['url'] as $test) {
11591159
if ($test($url, $testableUrl->getFile())) {
11601160
return true;
11611161
}
11621162
}
1163+
$solvedUrl = self::formatUrl($testableUrl->getSolvedUrl());
1164+
if ($url !== $solvedUrl) {
1165+
foreach ($this->exclusionTests['url'] as $test) {
1166+
if ($test($solvedUrl, $testableUrl->getFile())) {
1167+
return true;
1168+
}
1169+
}
1170+
}
11631171
return false;
11641172
}
11651173

0 commit comments

Comments
 (0)