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?
Comment | File | Size | Author |
---|---|---|---|
#7 | wysiwyg_filter-nofollow-on-relative-links-1077900-7.patch | 973 bytes | DrIPA |
#5 | rel_nofollow_goes-1077900-5.patch | 968 bytes | Johnny vd Laar |
#4 | wysiwyg_filter-nofollow-on-relative-links-1077900-4.patch | 986 bytes | rgristroph |
Comments
Comment #1
vinmassaro CreditAttribution: vinmassaro commentedSubscribing. I just ran into this as well - rel=nofollow is being added to relative links, particularly to PDFs being linked to internally.
Comment #2
dsrikanth CreditAttribution: dsrikanth commentedWas this resolved? I think this is critical at least with respect to SEO to be able to whitelist internal links
Comment #3
HyperGlide CreditAttribution: HyperGlide commentedFollow up to #2 was this resolved in the 6.x and 7.x branch?
Thank you.
Comment #4
rgristroph CreditAttribution: rgristroph commentedI 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.
Comment #5
Johnny vd Laar CreditAttribution: Johnny vd Laar at ezCompany commentednode/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.
Comment #6
Eric_A CreditAttribution: Eric_A commentedThat could unintentionally leave protocol relative URLs like //example.com/foo/bar alone.
Would
parse_url()
serve us better?Comment #7
DrIPA CreditAttribution: DrIPA commentedYes, this will also validate // as an external url.
I've added a new patch
Comment #8
Eric_A CreditAttribution: Eric_A commentedWorks for me! I'd say this is a bug and a major one too...
Comment #10
geek-merlin