Page MenuHomePhabricator

VisualEditor: {{referências}} injects additional HTML (<div><references /></div>) into wikitext
Closed, ResolvedPublic

Description

  1. Go to

https://pt.wikipedia.org/wiki/Associação_Médico-Espírita_do_Brasil?oldid=36199569&veaction=edit

  1. Click in the box in the top of the page and delete it
  2. Click on "Save page" and then "Review your changes"

The editor will add the code
<div class="reflist references-small" style><references /></div>
in the bottom of the page, as in this diff:
https://pt.wikipedia.org/wiki/Associação_Médico-Espírita_do_Brasil?diff=36364362&uselang=en


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51260

Details

Reference
bz51145

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:42 AM
bzimport set Reference to bz51145.

I don't know if this is relevant, but the same code "{{referências}}" expands to something different on [[pt:special:ExpandTemplates]]:

<h2 style="cursor:help" title="Esta seção não é editável por razões técnicas. Edite a página toda em vez disso.">Referências</h2>
<div class="reflist references-small" style=""><references group=""></references></div>

Direct link:
https://pt.wikipedia.org/w/index.php?title=Especial:Expandir_predefini%C3%A7%C3%B5es&input=%7B%7Brefer%C3%AAncias%7D%7D&contexttitle=Associa%C3%A7%C3%A3o+M%C3%A9dico-Esp%C3%ADrita+do+Brasil&removecomments=true&removenowiki=true

(In reply to comment #1)

I don't know if this is relevant, but the same code "{{referências}}" expands
to something different on [[pt:special:ExpandTemplates]]:

<h2 style="cursor:help" title="Esta seção não é editável por razões técnicas.
Edite a página toda em vez disso.">Referências</h2>
<div class="reflist references-small" style=""><references
group=""></references></div>

Direct link:
https://pt.wikipedia.org/w/index.php?title=Especial:
Expandir_predefini%C3%A7%C3%B5es&input=%7B%7Brefer%C3%AAncias%7D%7D&contextti
tle=Associa%C3%A7%C3%A3o+M%C3%A9dico-
Esp%C3%ADrita+do+Brasil&removecomments=true&removenowiki=true

That's pretty much the same as the expansion that leaks into the article, except for the first tag (the <h2>).

This little devil can be reproduced at
https://pt.wikipedia.org/wiki/User:John_Vandenberg/demo?veaction=edit
(remove the template at the top and click save)

It is a very common case, and VE cant be used safely on pt.wp until this is fixed.

Im guessing this is related to the high priority Cite enhancement bug 51260.

I can't reproduce this now using a simple test case. Has it still been happening on pt.wp?

I was NOT able to reproduce it following the steps from comment 0 and of comment 3, and also in the case of comment 4. Moreover, I don't remember seeing any new reports on this, so I'm marking this as FIXED (but I don't know which code change fixed the bug).