Page MenuHomePhabricator

visualdiff testing: Escaped link elements are shown in page view on fr.wikisource.org
Closed, ResolvedPublic

Event Timeline

Jgiannelos renamed this task from visualdiff testing: Escaped link elements are shown I page view on fr.wikisource.org to visualdiff testing: Escaped link elements are shown in page view on fr.wikisource.org.Oct 31 2025, 1:48 PM

From what I understand parsoid is escaping <link> elements as expected. Those links are injected from Module:Header_template lua script to add schema.org semantics.
I think ideally the microdata shouldn't be injected as hidden links but instead being added in existing elements <div>/<span> elements.

From what I understand parsoid is escaping <link> elements as expected. Those links are injected from Module:Header_template lua script to add schema.org semantics.
I think ideally the microdata shouldn't be injected as hidden links but instead being added in existing elements <div>/<span> elements.

Disagreeing here, most websites do include this data in link tags, but even besides that, there is fair bit of scripts that rely on these tags being around to find wikidata IDs and similar, updating everything to use <div> and <span> tags is going to be a much more significant undertaking.

Change #1215585 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/services/parsoid@master] Implement sanitization of meta/link tags with schema.org microdata

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

@Jgiannelos are there any blockers on this? This affects a reader-facing component of Wikisource (the book download functionality), and having it broken for multiple weeks is less than ideal

Change #1225613 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/mediawiki-config@master] ProofreadPage: Disable flag to render using parsoid temporarily

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

@Soda I am flipping the flag to use legacy for now until this gets resolved.

Change #1225613 merged by jenkins-bot:

[operations/mediawiki-config@master] ProofreadPage: Disable flag to render using parsoid temporarily

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

Mentioned in SAL (#wikimedia-operations) [2026-01-13T14:08:23Z] <zabe@deploy2002> Started scap sync-world: Backport for [[gerrit:1225613|ProofreadPage: Disable flag to render using parsoid temporarily (T408915)]]

Mentioned in SAL (#wikimedia-operations) [2026-01-13T14:12:42Z] <zabe@deploy2002> jgiannelos, zabe: Backport for [[gerrit:1225613|ProofreadPage: Disable flag to render using parsoid temporarily (T408915)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-01-13T14:22:07Z] <zabe@deploy2002> Finished scap sync-world: Backport for [[gerrit:1225613|ProofreadPage: Disable flag to render using parsoid temporarily (T408915)]] (duration: 13m 44s)

https://en.wikipedia.org/w/index.php?title=User:Cscott/T408915&useparsoid=0 vs https://en.wikipedia.org/w/index.php?title=User:Cscott/T408915&useparsoid=1 is a good test case.

Parsoid never allows <link> or <meta> as wikitext; the core sanitizer does, but only in certain cases.

See also T78055: Add parsertests for Parsoid <meta>/<link> tags. (which may explain why it is hard to write parser tests for this), and T25932: Allow use of semantic HTML5 elements in wikitext (which seems to credit Parsoid with handling <meta>/<link> correctly, when we apparently don't).

I think this is a matter of caching. After https://phabricator.wikimedia.org/T408915#11516718 i reverted the flag that we use parsoid on proofreadpage rendering until we have a proper solution. I purged the page and it renders links properly now.

I think this is a matter of caching. After https://phabricator.wikimedia.org/T408915#11516718 i reverted the flag that we use parsoid on proofreadpage rendering until we have a proper solution. I purged the page and it renders links properly now.

You are right, my two links look the same now.

Change #1215585 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Implement sanitization of meta/link tags with schema.org microdata

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

Change #1239722 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a16

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

Change #1239722 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a16

Reason:

bad patch

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

Change #1239748 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a16

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

Change #1239748 abandoned by C. Scott Ananian:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a16

Reason:

Abandoned in favor of Ib80b94a5a60095822bcae199a651d6b4adf7c542

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

Change #1240682 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/mediawiki-config@master] proofreadpage: Enable parsoid for rendering extension output

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

Change #1240682 merged by jenkins-bot:

[operations/mediawiki-config@master] proofreadpage: Enable parsoid for rendering extension output

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

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:28:18Z] <jgiannelos@deploy2002> Started scap sync-world: Backport for [[gerrit:1240682|proofreadpage: Enable parsoid for rendering extension output (T408915)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:30:29Z] <jgiannelos@deploy2002> jgiannelos: Backport for [[gerrit:1240682|proofreadpage: Enable parsoid for rendering extension output (T408915)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:36:00Z] <jgiannelos@deploy2002> Finished scap sync-world: Backport for [[gerrit:1240682|proofreadpage: Enable parsoid for rendering extension output (T408915)]] (duration: 07m 41s)