Page MenuHomePhabricator

VisualEditor: Wikitext is appearing in the readmode for the numbered list and bullet list that is inside reference dialog box
Closed, ResolvedPublic

Description

In the read mode

Steps to reproduce:

1.Open a page with VE
2.Add a reference to a text by going to Insert>Reference
3.When the reference dialog box opens up insert a numbered list and then type the reference for example as: 1.reference
4.Click on "Insert Reference"
5.Save the page

Observed Result:
In the read mode,the serials of the numbered list are appearing in wikitext with #.

See the screenshot attached

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Jan7th


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-01-07_at_11.17.24_AM.png (225×593 px, 28 KB)

Details

Reference
bz59781

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:26 AM
bzimport set Reference to bz59781.

Created attachment 14250
In Edit mode

Attached:

Screen_Shot_2014-01-07_at_11.17.03_AM.png (270×999 px, 15 KB)

This issue is also occurring for bullet list thats is added inside Reference dialog bix, they appear as * in the Read mode

One really shouldn't put lists inside a reference. References are supposed to be a single paragraph. I'll remove the tools for doing so which should reduce the impact of this.

Todo: create a ticket for the Parsoid side if this bug (not inserting line breaks before */#)

(In reply to Ed Sanders from comment #5)

Todo: create a ticket for the Parsoid side if this bug (not inserting line
breaks before */#)

Ed, what's the specific problem Parsoid's doing wrong?

<p>Hey!<span class="reference" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;&lt;ul &gt;&lt;li &gt; foo&lt;/li&gt;&lt;li &gt; bar&lt;/li&gt;&lt;li &gt; baz&lt;/li&gt;&lt;/ul&gt;&quot;},&quot;attrs&quot;:{}}" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref"><a href="#cite_note-1">[1]</a></span></p>

… goes neatly to …

Hey!<ref>* foo

  • bar
  • baz</ref>

With \n as needed.

The PHP parser requires a \n before every *, including the first one. So it should be:

Hey!<ref>

  • foo
  • ...

Unless you want to start messing with the PHP parser...