Page MenuHomePhabricator

"shield-container" <div> added in every <ref>
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • use VisualEditor
  • user report: Version 96.0.4664.110 Google Chrome. I opened the visual editor and there I clicked on "Source", then I selected "Automatic", inserted an unformed link and clicked "Generate" and "Insert".

What happens?:

<div id="ssipdojbal" class="shield-container" style="cursor: pointer; display: -webkit-inline-box; width: 16px; height: 16px; min-width: 16px;"><div data-reactroot="" class="shield_container"><div class="wot_shield shield shield_gray "></div></div></div>

What should have happened instead?:

  • clean code without it

Event Timeline

It happens when you use the Web of Trust extension.

matmarex moved this task from To Triage to Triaged on the VisualEditor board.

There was a previous issue with the same extension that was very similar: T189148: "donut-container" <div> added in every <ref>. Looks like the format of the junk the extension adds to pages has changed, and so our workaround that was supposed to remove it it no longer works. We can probably update it.

Change 748769 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update Web of Trust junk workaround

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

Change 748770 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Remove more DOM garbage introduced by 'Web of Trust' extension

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

Change 748769 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/VisualEditor@master] Update Web of Trust junk workaround

Reason:

Looks like Ed has written the same patch at the same time, heh. I like his commit message more.

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

Change 748770 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove more DOM garbage introduced by 'Web of Trust' extension

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

Change 748842 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/Cite@master] Don't attach DOM nodes from the DM store to the main document

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

We might be able to prevent this in the future without maintaining a list of every extension that does this. I filed T298147 about the additional work and moved the new patch there.