Page MenuHomePhabricator

A16. Flow: external links should have rel="nofollow" property
Closed, ResolvedPublic1 Story Points

Description

Split from T58756: Parsoid doesn't give external links class="external free|text"

External links in Parser output have <a rel="nofollow" class="external";
external links in Parsoid output have <a title="" rel="mw:ExtLink"

Outputting rel="nofollow" tells search engines not to follow the link (more a suggestion to Google) and is an indicator to decrease search engine rank. So adding this to Flow's HTML output from Parsoid might reduce spammers' incentive.

There's logic in Parser::getExternalLinkRel to decide whether to output nofollow, I think Flow can just call that public function in code similar to includes/Parsoid/Redlinker.php.

From IRC:
<gwicke> do you remember what the use case for the exceptions was?

$wgNoFollowNsExceptions and $wgNoFollowDomainExceptions

<hoo> First one: No idea... probably someone thought someone else could use that sometime.

Second one: To white list own domains

Version: master
Severity: normal

Details

Reference
bz66289

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:23 AM
bzimport set Reference to bz66289.
bzimport added a subscriber: Unknown Object (MLST).

Parsoid may address this, bug 52617, and/or Flow could do it.

EBernhardson triaged this task as Low priority.Dec 12 2014, 7:43 PM

This should likely be done, but I feel it is not our job to do it. We could add more postprocessing to the parsoid output but unless there is a pressing need we should just wait for parsoid to make a decision.

Mattflaschen-WMF set Security to None.
Quiddity removed a subscriber: Maryana.Dec 19 2014, 1:42 AM
DannyH edited a custom field.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 22 2015, 7:07 PM
DannyH renamed this task from Flow: external links should have rel="nofollow" property to A16. Flow: external links should have rel="nofollow" property.Apr 22 2015, 8:05 PM
DannyH moved this task from Current workboard to Untriaged on the Collaboration-Team-Triage board.
Catrope claimed this task.Apr 24 2015, 1:15 AM

Change 206344 had a related patch set uploaded (by Catrope):
Fix up a[rel=mw:ExtLink] to have class="external" and rel="nofollow"

https://gerrit.wikimedia.org/r/206344

Change 206344 merged by jenkins-bot:
Fix up a[rel=mw:ExtLink] to have class="external" and rel="nofollow"

https://gerrit.wikimedia.org/r/206344

Checked on beta. The white listed domains(do not have "nofollow")
'mediawiki.org',

		'wikibooks.org',
		'wikimediafoundation.org',
		'wikimedia.org',
		'wikinews.org',
		'wikipedia.org',
		'wikiquote.org',
		'wikisource.org',
		'wikiversity.org',
		'wiktionary.org',
		'wikivoyage.org',
		'wikidata.org',
		'tools.wmflabs.org',
		'etherpad.wmflabs.org'

The list is from https://phabricator.wikimedia.org/T54617 - 'wgNoFollowDomainExceptions'

Catrope closed this task as Resolved.Apr 27 2015, 10:38 PM