Page MenuHomePhabricator

MWTidy: Old versions of Tidy break flow content out of <caption> and <table>
Closed, ResolvedPublic



Steps to reproduce

1.Insert a table
2.Insert a caption "text2"
3.Make the caption a bullet point to create a slug above it
4.Now add some other text in that slug "text1"
5.Save the page

Observed Result:
The order of "text1" and "text2" gets reversed.

Version: unspecified
Severity: normal




Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:54 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz72833.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 17004
video capture

Still reproducible, see the video capture


Still works on my local machine.

The wikitext produced is:



  • Bar



which looks problematic but locally renders fine as

<table><caption>Foo<ul><li>bar... but on production and betalabs renders as <ul><li>bar</li></ul><table><caption>Foo...

Apparently this is a bug with HTMLTidy.

Aklapper added a subscriber: Aklapper.
Jdforrester-WMF set Security to None.

Re-tested and confirmed that this still happens (unsurprisingly).

MattFitzpatrick renamed this task from MediaWiki: Lists inside captions end up outside of the table with Tidy enabled to MWTidy: Old versions of Tidy break flow content out of <caption> and <table>.Sep 18 2017, 11:26 PM
MattFitzpatrick added subscribers: eranroz, Krenair, matmarex.

As mentioned in T76100, this was fixed in 2015, in tidy-html5.

Izno claimed this task.
Izno added a subscriber: Izno.

This looks like it is fixed either in VisualEditor in some way or due to Remex. I followed the steps in the video as best as possible with the current VE design and the text appeared in the expected locations.