Page MenuHomePhabricator

CSS/wikitext leaking into text inside On This Day
Open, LowPublicBUG REPORT

Description

The onthisday endpoint occasionally emits raw CSS and/or wikitext as part of the text that it returns.
For example:
https://en.wikipedia.org/api/rest_v1/feed/onthisday/all/09/07

In the entry for 2017 there are CSS classes that are in the text.

Event Timeline

Dbrant renamed this task from Display settings leaking into text inside On This Day to CSS/wikitext leaking into text inside On This Day.Sep 7 2021, 2:59 PM
Dbrant updated the task description. (Show Details)
Dbrant moved this task from Needs Triage to Tracking on the Wikipedia-Android-App-Backlog board.
MSantos subscribed.

@Mr_Patoot thanks for reporting this issue!

Could you please provide more details to understand the issue?

The endpoint output is very extensive and I couldn't find the issue you mentioned from a quick scan.

Sorry, I updated the task description and should have been more precise.
If you look at the output of the events endpoint for this particular day:
https://en.wikipedia.org/api/rest_v1/feed/onthisday/events/09/07

one of the entries has unparsed stuff in the text field:
(search for the keyword Equifax)

{
    text: "Equifax announce a cyber-crime identity theft event potentially impacting approximately 145.mw-parser-output .frac{white-space:nowrap}.mw-parser-output .frac .num,.mw-parser-output .frac .den{font-size:80%;line-height:0;vertical-align:super}.mw-parser-output .frac .den{vertical-align:sub}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}1⁄2 million U.S. consumers.",
    pages: [
        {
            type: "standard",
            title: "Equifax",
            displaytitle: "Equifax",
...

This seems to happen for all entries that use a {{frac}} template in the original wikitext.