Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simpsoka
Copy link

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
Copy link

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