Page MenuHomePhabricator

Media: handle items that link to documents other than a File page
Closed, DeclinedPublic


These should be either excluded from the results or included with a linked_content property pointing to the linked document.

Event Timeline

Mholloway created this task.Dec 7 2017, 3:00 PM
Mholloway removed a subscriber: gerritbot.

@Tgr I'm looking at the MultimediaViewer extension code but it's not clear to me how this specific exclusion is implemented there. Could you point me in the right direction?

Tgr added a comment.Dec 7 2017, 6:12 PM

I believe it just relies on MediaWiki only adding the image class when the link is not customized, so none of the selectors would match such an image. No idea if Parsoid HTML has something equivalent. (Of course you could always just look at where the href goes.)

Examining the href makes sense.

The only cases of this that I've found so far end up being things that are already being filtered out by our filtering for size and mime type[1]. For instance, on the Barack Obama article, there are two that we'd otherwise catch with the href checking: an icon linking to Wikisource and an icon linking to Wikidata.

Is this the kind of thing the check was meant to catch, or are there better examples somewhere?


Mholloway closed this task as Declined.Dec 13 2017, 8:22 PM

Per discussion in weekly RI meeting, no need for special handling of these since (unlike MediaViewer) we're not altering link behavior.