Skip to content

Fix: Re-enable no-broken-links and ignore rel=nofollow#5994

Open
simpsoka wants to merge 1 commit intowebhintio:mainfrom
simpsoka:fix/reenable-no-broken-links
Open

Fix: Re-enable no-broken-links and ignore rel=nofollow#5994
simpsoka wants to merge 1 commit intowebhintio:mainfrom
simpsoka:fix/reenable-no-broken-links

Conversation

@simpsoka
Copy link
Copy Markdown

Fix #5754

Re-enable the no-broken-links hint in the web-recommended configuration. Update the hint logic to ignore <a> elements that contain rel="nofollow" when checking for broken links (404, 410, 500, 503 status codes). This prevents reports for links explicitly marked as not endorsed.

Add unit tests to verify that links with rel="nofollow" are correctly skipped, while ensuring that regular broken links are still reported as expected.

Pull request checklist

Make sure you:

Re-enable the `no-broken-links` hint in the web-recommended
configuration. Update the hint logic to ignore `<a>` elements that
contain `rel="nofollow"` when checking for broken links (404, 410,
500, 503 status codes). This prevents reports for links explicitly
marked as not endorsed.

Add unit tests to verify that links with `rel="nofollow"` are
correctly skipped, while ensuring that regular broken links are
still reported as expected.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#5754
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Reenable Broken link found (404 response).

1 participant