Page MenuHomePhabricator

CSS is treated as text in article abstracts
Closed, InvalidPublic

Description

Description

Some article abstracts contain CSS rules as normal text. Affected abstracts include content such as .mw-parser-output, @media, and other stylesheet declarations.

We have identified 73 affected articles across 6 Wikipedia projects.

Expected behavior

The generated abstract should contain readable article text only. CSS and TemplateStyles content should be excluded.

Actual behavior

CSS declarations are included in or prepended to the generated abstract.

How to reproduce

  1. Process or inspect the generated abstract for one of the example articles below.
  2. Search the abstract for .mw-parser-output or @media.
  3. Observe that CSS declarations are included as normal abstract text.

Examples

Event Timeline

Process or inspect the generated abstract for one of the example articles below.

@LDlulisa-WMF: How to generate an abstract? Which piece of software is this about?

Please associate one or more active project tags with this task (via the Add Action... → Change Project Tags dropdown). That will allow to see a task when looking at project workboards or searching for tasks in certain projects, and get notified about a task when watching a related project tag. Thanks! :)

ssastry subscribed.

Taking two random pages from ffwiki ( https://ff.wikipedia.org/wiki/Farayse_Choy and https://ff.wikipedia.org/wiki/Andara ), the page source has the CSS embedded in nowiki ... and if you look at the article histories (example), the page was created by an editor using Content Translation when the CSS was introduced as text.

Same for this tewiki page

At best, it is a bug in Content Translation. Feel free to file a bug against Content Translation about this, but this is not a PCS or a Parsoid issue. Closing this as invalid.

@Aklapper Thanks, I've added the tags. I believe this is for the parsoid team in the content-platform team. Many of the listed articles have broken css in the article abstract presented to the user.

Thanks @ssastry, I've filed a ticket with Content Translation.