When set to check all internal and external URLs, a link of the form mailto:user@example.com is checked as http://www.example.commailto:user@example.com and is reported as broken. This also happens with javascript: links.

Comments

rsvelko’s picture

same with the 6.x. branch

hass’s picture

Please enable "Check full qualified domain names only" and provide a patch. The problem is that mailto and others pass http://api.drupal.org/api/function/valid_url/6 as valid URL... :-(

jromine’s picture

Status: Active » Needs review
StatusFileSize
new538 bytes

Yes, valid_url() only checks ftp and http[s] schemes. Patch attached.

jromine’s picture

StatusFileSize
new538 bytes

Sorry, I reversed the logic in the fix. Here's a corrected fix which skips mailto:, javascript:, etc. links.

rsvelko’s picture

I patched and after several cron runs I cannot make mailto: links disappear from the reports page and the links table.

What would you suggest? How does this module work as a workflow?

Scan nodes - find links -> log each to the linkchecker_links and linkchecker_nodes table

But what is missing in the above workflow (and I am sure linkchecker does it somehow) is how are manually fixed links removed from the table? Or they re just made status 200 which is ignored in the report?

So, will the table get smaller bec of that patch?

I still have those "http://example.commailto:office@example.com" links in the url field of the links table...

hass’s picture

With your patch applied you need to re-save the node where this broken links are in... that's all. The cleanup task remove the entry later from the table. Otherwise you can clear all links and rescan all nodes... there is a button on the link checker config page. Not sure how many nodes have emails inside...

hass’s picture

Status: Needs review » Fixed

Fixed in CVS. I hope this works well as it haven't been tested very much by me...

hass’s picture

Only to note for a .test we may need to write, URLs like http://www.example.com:8080/foo are extracted correctly.

hass’s picture

Title: mailto: links reported as broken » mailto:, javascript: and other links reported as broken

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.