While going through and adding the class "external" to the external links, why not also add rel="external" to add a bit more semantic meaning to it.

I'm just thinking about this as jQuery Mobile uses this to treat external links differently.

Comments

quicksketch’s picture

Initially I thought this was another request to add "nofollow" (#136105: Add rel="nofollow"), but "external" must have some other purpose and actually be useful when added with JS? Could you describe what benefit it has? To me, it seems likely that this would conflict with rel="nofollow" that users may have entered manually or added by a text filter.

mgifford’s picture

Status: Active » Postponed

Wish I had a better link to the documentation on this, but it was coming from the JQM issue queue:
https://github.com/jquery/jquery-mobile/issues/search?q=rel%3D%22externa...

Hmm, maybe I mis-understood it... Just going through:
http://jquerymobile.com/test/docs/pages/page-links.html

I'm going to mark this as postponed for now until I can dig up some more info on it. Sorry. I too had wondered how it would fit with other "rel" attributes. Didn't have an answer to that.

eamonogealagain’s picture

The @rel attribute takes a space-separated list, in a similar manner to the @class attribute. Valid values for @rel and their semantic meanings/functions are listed here: http://www.w3.org/TR/html5/links.html#linkTypes

So in theory, "external" shouldn't conflict with "nofollow". The only potential issue here is that, while @rel may be *supposed* to support multiple values according to the spec. - evidently not everyone reads the spec. so it's possibly there could be some modules/js libraries that in some way use/rely on "nofollow" being the only value in the attribute.

(found this thread from a Google search so thought I'd add some info. I have no opinion otherwise on the priority of the feature request)

elachlan’s picture

Version: 7.x-1.9 » 7.x-1.13
Issue summary: View changes
Status: Postponed » Active

I would like to see this included. We shouldn't postpone or avoid something because another module has bad code. We should update it and help fix the bad code in the corresponding projects when issues arise.

geek-merlin’s picture

There is another candidate to include: rel=norefer(r?)er
;-)>

geek-merlin’s picture

Status: Active » Closed (won't fix)

Just peeked into the source and was reminded that this module alters links with js.

Imho we can't rely that search engines as targets of the rel attributes will honor them if they're not in the original markup.
If that's correct then it's a clear wontfix.

We may use e.g. https://www.drupal.org/project/elf which claims to have this ability already.

elachlan’s picture

Brilliant. Thanks for that Axel!