Page MenuHomePhabricator

Line break in tablecells
Closed, ResolvedPublic

Description

Author: michael.schliephake

Description:
The Wiki input:

Line-break test

{|

-
Line 1<br/>Line 2<br/>

Line 3

...
}

Line 1<br/>Line 2<br/>
Line 3

produces HTML-Source (somewhat beautified) :

<h3><span class="mw-headline">line-break test</span></h3>

Line 1<br />
Line 2<br />
<p>Line 3</p>
...

<p>Line 1<br />
Line 2<br />
Line 3</p>

I would not expect a paragraph (<p>...</p>) for "Line 3" in the table cell. This
leads to an additonal empty space between Line 2 and Line 3 in the table.

Detected in version 1.6.8. It exists still in the current version and was tested
in the Sandbox of the MediaWiki-Site (V1.9 alpha).


Version: 1.9.x
Severity: minor

Details

Reference
bz8037

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:29 PM
bzimport set Reference to bz8037.
bzimport added a subscriber: Unknown Object (MLST).

fibonacci.prower wrote:

This bug is even more evident when using HTML tables instead of wiki markup. Say:

Line 1<br />
Line 2<br />
Line 3<br />
Line 4

Instead of producing the exact same thing in the HTML source, produces this:

Line 1<br />
<p>Line 2<br />
Line 3<br /></p>
Line 4

If a linebreak is inserted before </td>:

Line 1<br />
Line 2<br />
Line 3<br />
Line 4

The </p> tag in the HTML source appears after the last line:

Line 1<br />
<p>Line 2<br />
Line 3<br />
Line 4</p>

It appears that in a table cell, everything right after the first line and before the last is interpreted as a new paragraph by MediaWiki.

This is just a special case of bug 5718 (when the block-level elements causing the trouble are table cells <td>), marking as duplicate.

  • This bug has been marked as a duplicate of bug 5718 ***