Page MenuHomePhabricator

Reference seems broken in Cat#Running section
Closed, ResolvedPublic

Description

Actual

https://en.wikipedia.org/api/rest_v1/page/html/Cat#Running (and transitively https://en.wikipedia.org/api/rest_v1/page/mobile-html/Cat#Running)

Screen Shot 2018-08-02 at 11.38.21 AM.png (155×973 px, 54 KB)

[185][<span title="The material near this tag relies on an unreliable source. This is a "fluff" primary source (an advice/opinion column) which provides no indication of its own sources, and which is published by a WP:FRINGE "alternative health" and anti-vaccination veterinary quack; Mercola.com has been independently reviewed as "likely to mislead consumers by offering one-sided, incomplete, inaccurate, or misleading information." (June 2018)">unreliable source]

Expected

On desktop web it shows [185][unreliable source].

Version

Parsoid: 1.7.0
Cat page revision: 853117816

Event Timeline

Arlolra subscribed.

The "reason" argument to the template,

{{unreliable source?|certain=y|date=June 2018|reason=This is a "fluff" primary source (an advice/opinion column) which provides no indication of its own sources, and which is published by a WP:FRINGE "alternative health" and anti-vaccination veterinary quack; Mercola.com has been independently reviewed as "likely to mislead consumers by offering one-sided, incomplete, inaccurate, or misleading information."}}

gets stuffed in the <span> element's "title",

[[Wikipedia:Identifying reliable sources|<span title="The material near this tag relies on an unreliable source. This is a "fluff" primary source (an advice/opinion column) which provides no indication of its own sources, and which is published by a WP:FRINGE "alternative health" and anti-vaccination veterinary quack; Mercola.com has been independently reviewed as "likely to mislead consumers by offering one-sided, incomplete, inaccurate, or misleading information."&#32;(June 2018)">unreliable source</span>]]

Because of the bad quote nesting, the "/" char is found in an attribute name position, which aborts Parsoid's parsing the span as tag and this gets output as literal text. The php parser is more resilient to that, but I'll have to look at the attribute parsing spec to see who's doing the right thing. At first glance, Chrome seems to agree with the php parser.

If there's a rush to fix this, just change the quoting passed into the template.

Arlolra triaged this task as Medium priority.Aug 2 2018, 7:01 PM

Change 450179 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Ignore solidus (/) in various attribute tokenizing states

https://gerrit.wikimedia.org/r/450179

Change 450179 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Ignore solidus (/) in various attribute tokenizing states

https://gerrit.wikimedia.org/r/450179

Looks good in the Android app as well. Thank you for the quick fix!