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)

[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

bearND created this task.Aug 2 2018, 5:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 2 2018, 5:37 PM
bearND updated the task description. (Show Details)Aug 2 2018, 5:39 PM
Arlolra claimed this task.Aug 2 2018, 6:31 PM
Arlolra added a subscriber: Arlolra.

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 Normal 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

Arlolra closed this task as Resolved.Aug 4 2018, 2:53 PM
bearND added a comment.Aug 6 2018, 9:10 PM

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