These should be either excluded from the results or included with a linked_content property pointing to the linked document.
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | None | T169242 Develop Page Content Service for Reading Clients | |||
| Resolved | None | T177425 Develop General Layer of PCS | |||
| Resolved | • Jhernandez | T177426 Develop structured JSON APIs for general consumption | |||
| Resolved | • Mholloway | T177430 Develop a Media JSON API | |||
| Declined | None | T182329 Media: handle items that link to documents other than a File page |
Event Timeline
@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?
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?
[1] https://github.com/wikimedia/mediawiki-services-mobileapps/blob/master/lib/media.js#L159-L168
Per discussion in weekly RI meeting, no need for special handling of these since (unlike MediaViewer) we're not altering link behavior.