- Mentioned In
- T151055: [Spike: 3 Hours] Investigate page_summary RESTBase API
T141651: Hovercards fail to bold article title when it does not appear verbatim in the text extract
T113633: Spike: Alternative to TextExtracts for Popups, Gather, Read more
T113094: [EPIC] The Page Summary API needs to provide useful content for the majority of articles
- Mentioned Here
- T152414: Previews must display useful text for the majority of articles
T99793: Hovercard ignores math formulae
T141766: hovercards don't show equations correctly
Hovercards makes a request for https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts%7Cpageimages%7Crevisions&formatversion=2&redirects=true&exintro=true&exsentences=5&explaintext=true&piprop=thumbnail&pithumbsize=300&rvprop=timestamp&titles=Googol&smaxage=300&maxage=300&uselang=content
The directive explaintext tells TextExtracts to return extracts as plain text instead of limited HTML... so this is doing exactly what it should. Hovercards should probably request HTML.
Potentially. We'd need to explore it. I'd expect that we'd need to parse the output into a DOM tree and whitelist only a few images e.g. p tags, sub, and sup.
I'd suggest to implement this we'd try a different mode e.g. explainhtmlsubset and test out on mobile first.
Related to (loading plain text instead of HTML):
should we track tasks like this under one task?