Skip to content

Commit

Permalink
Skip checking URLs that start with #
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopetkov committed Sep 16, 2021
1 parent 36f884f commit 9acacb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Audits/Internal/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static function checkPage(string $id, string $pageID): void
$counter = 0;
foreach ($links as $link) {
$linkLocation = trim($link->getAttribute('href'));
if (strlen($linkLocation) > 0 && strpos($linkLocation, 'javascript:') !== 0 && strpos($linkLocation, 'mailto:') !== 0) {
if (strlen($linkLocation) > 0 && strpos($linkLocation, 'javascript:') !== 0 && strpos($linkLocation, 'mailto:') !== 0 && strpos($linkLocation, '#') !== 0) {
$counter++;
$linkID = md5($linkLocation . '-' . $counter);
$shortURL = self::getShortURL($data['u'], $linkLocation);
Expand Down

0 comments on commit 9acacb0

Please sign in to comment.