Hi, good work on a great filter, and I look forward to the D7 release, I still haven't found an effective replacement.

I'm using this filter with ckEditor.

I'm really like the spam link deterrent whitelist, but have just noticed that all relative links in my content are being screened out by the filter.

I can of course add all the links as absolute, but then that will stuff things up when I grab the site to work on it locally.

I have pages that aren't in menus or linked from other places outside the content, so this is really bad for SEO as none of them will be indexed by robots.

I can't see the harm in allowing relative links as they can never link outside the site anyway.
Can this be incorporated into the filter?

Members fund testing for the Drupal project. Drupal Association Learn more


vinmassaro’s picture

Subscribing. I just ran into this as well - rel=nofollow is being added to relative links, particularly to PDFs being linked to internally.

dsrikanth’s picture

Was this resolved? I think this is critical at least with respect to SEO to be able to whitelist internal links

HyperGlide’s picture

Follow up to #2 was this resolved in the 6.x and 7.x branch?

Thank you.

rgristroph’s picture

I ran into this problem on the Drupal 7 version.

The problem was that when doing a whitelist nofollow policy, if there is a relative link, it does not find a domain from the whitelist, because there is no domain at all, and then it adds the rel="nofollow". I made it check for a leading "/" as a way of detecting the relative link.

Note that the attached patch is for the Drupal 7 version -- I will see about re-rolling it for Drupal 6 as well.

Johnny vd Laar’s picture

Version: 6.x-1.5 » 7.x-1.x-dev
Status: Active » Needs review
968 bytes

node/12 is also a relative path and doesn't have a leading slash. I modified the check to see if the link contains ://. If not then it is relative.

Eric_A’s picture

I modified the check to see if the link contains ://

That could unintentionally leave protocol relative URLs like //example.com/foo/bar alone.
Would parse_url() serve us better?

e.ruiter’s picture

Would parse_url() serve us better?

Yes, this will also validate // as an external url.

I've added a new patch

Eric_A’s picture

Component: Miscellaneous » Code
Category: Feature request » Bug report
Status: Needs review » Reviewed & tested by the community

Works for me! I'd say this is a bug and a major one too...