Last modified: 2014-06-06 23:30:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58756, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56756 - Flow: Parsoid doesn't give external links class="external free|text"
Flow: Parsoid doesn't give external links class="external free|text"
Status: NEW
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on: 51245
Blocks: 65243
  Show dependency treegraph
 
Reported: 2013-11-08 01:46 UTC by Quiddity
Modified: 2014-06-06 23:30 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Quiddity 2013-11-08 01:46:32 UTC
The https://commons.wikimedia.org/wiki/File:Icon_External_Link.svg icon should appear to the right of external links, but isn't currently.
Comment 1 spage 2013-11-08 19:09:06 UTC
The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/427, but people from the community are welcome to contribute here and in Gerrit.
Comment 2 spage 2013-11-23 08:19:55 UTC
Parsoid knows it's an external link but doesn't add the class "external text", or rel="nofollow" that a link in article HTML has.

spage@ee-flow:~$ curl -d 'wt=[http://example.com external]' -d 'body=1' localhost:8000/localhost/Main_Page
   ...
   <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"targetOff":20,"contentOffsets":[20,28],"dsr":[0,29,20,1]}'>external</a>

compared with wikitext HTML:

<a href="http://example.com" class="external text" rel="nofollow">external</a>
Comment 3 Gabriel Wicke 2013-11-25 19:32:59 UTC
The class does not seem to be needed in Parsoid output as the typeof attribute can be used instead. Creating updated styles is bug 51245.

rel=nofollow is bug 52617.
Comment 4 Gerrit Notification Bot 2014-03-13 11:22:53 UTC
Change 118447 had a related patch set uploaded by Matthias Mullie:
Add selectors for Parsoid-output external links

https://gerrit.wikimedia.org/r/118447
Comment 5 Gerrit Notification Bot 2014-03-13 11:24:10 UTC
Change 118448 had a related patch set uploaded by Matthias Mullie:
Add selector for Parsoid-output external links

https://gerrit.wikimedia.org/r/118448
Comment 6 Gerrit Notification Bot 2014-03-13 11:25:21 UTC
Change 118449 had a related patch set uploaded by Matthias Mullie:
Add selectors for Parsoid-output external links

https://gerrit.wikimedia.org/r/118449
Comment 7 Gerrit Notification Bot 2014-03-13 11:26:19 UTC
Change 118450 had a related patch set uploaded by Matthias Mullie:
Add selector for Parsoid-output external links

https://gerrit.wikimedia.org/r/118450
Comment 8 Gerrit Notification Bot 2014-03-13 11:27:15 UTC
Change 118451 had a related patch set uploaded by Matthias Mullie:
Add selector for Parsoid-output external links

https://gerrit.wikimedia.org/r/118451
Comment 9 Gerrit Notification Bot 2014-03-13 11:29:15 UTC
Change 118452 had a related patch set uploaded by Matthias Mullie:
Add selectors for Parsoid-output external links

https://gerrit.wikimedia.org/r/118452
Comment 10 Matthias Mullie 2014-03-13 13:14:42 UTC
There's a couple of ways we could go about this:

* Parsoid could add class="external" to external links
* Skins' CSS could target [rel="mw:ExtLink"] too, like it currently only targets .external
* Flow could hack around this, finding [rel="mw:ExtLink"] links and adding class="external"

I would prefer not to do #3. I've uploaded a couple of patches that should do #2 in all skins & extensions that currently only target .external. Not sure if that's going to be an approach everyone will agree with. If it is, I'll do the same for rel="nofollow"
Comment 11 Jon 2014-03-13 18:23:06 UTC
Shouldn't Parsoid simply use the external link class so we can turn that into a defacto standard? Is there any reason it can't?
Comment 12 Matthias Mullie 2014-03-20 16:09:48 UTC
I noticed "trying to generalize CSS / JS integration for Flow, VE etc" under "Parsoid" in the notes of the last scrum of scrums; I assume it's related to this bug.

https://www.mediawiki.org/wiki/Scrum_of_scrums/2014-03-19
Comment 13 Gerrit Notification Bot 2014-03-31 13:06:06 UTC
Change 118447 abandoned by Matthias Mullie:
Add selectors for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118447
Comment 14 Gerrit Notification Bot 2014-03-31 13:06:13 UTC
Change 118448 abandoned by Matthias Mullie:
Add selector for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118448
Comment 15 Gerrit Notification Bot 2014-03-31 13:06:21 UTC
Change 118449 abandoned by Matthias Mullie:
Add selectors for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118449
Comment 16 Gerrit Notification Bot 2014-03-31 13:06:28 UTC
Change 118450 abandoned by Matthias Mullie:
Add selector for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118450
Comment 17 Gerrit Notification Bot 2014-03-31 13:06:34 UTC
Change 118451 abandoned by Matthias Mullie:
Add selector for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118451
Comment 18 Gerrit Notification Bot 2014-03-31 13:06:42 UTC
Change 118452 abandoned by Matthias Mullie:
Add selectors for Parsoid-output external links

Reason:
Looks like Parsoid is working on this

https://gerrit.wikimedia.org/r/118452
Comment 19 spage 2014-06-06 23:25:49 UTC
I split 'adding rel="nofollow" to links' into bug 66289.

Parsoid's CSS module in core (resources/src/mediawiki.skinning/content.parsoid.less) should output similar CSS to the changes in these abandoned patches, i.e. style
   a[rel="mw:ExtLink"]
appropriately.

Note the Vector skin no longer styles different URL formats (mailto, ftp) different) and file types (.mp3, .pdf) differently, but other skins like ?useskin=monobook do.

There's another wrinkle to external links.
Parser also outputs CSS class="free" if it's a bare external link in text (e.g. ... http://example.com ...) and outputs CSS class="text" if it's an external link in wikitext markup (e.g. ... [http://example.com foo] ...).  Parsoid doesn't output these classes, though the information to distinguish them be in data-parsoid: {stx:"url"}.

skins/common/commonPrint.css styles .text , and skins/common/shared.css styles .free.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links