Last modified: 2013-01-31 14:07:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26420, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24420 - Inconsistent handling of empty table rows
Inconsistent handling of empty table rows
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-17 21:15 UTC by entlinkt
Modified: 2013-01-31 14:07 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description entlinkt 2010-07-17 21:15:47 UTC
The wikitext

{| class="wikitable"
|-

|-

|-

|-
<span>Text outside table</span>
|-

|-

|-

|}

is rendered as

<p><span>Text outside table</span></p>
<table class="wikitable"></table>

which allows content outside a table to be generated from within a table. This is currently (ab-?)used by infobox templates at dewiki to generate several sorts of "maintenance" stuff (basically wikilinks inside a span with display:none) outside the table, based on conditionals that are checked inside the table, without generating an empty table row.

It does, however, generate an additional paragraph before the table that cannot be hidden with display:none. It's rendered like an empty paragraph (because all its contents is hidden with display:none), but can still impact page rendering because it has margins. Not to say that it is unsemantic.

Trying to get rid of the additional paragraph by using a block element as in

{| class="wikitable"
|-

|-

|-

|-
<div>Text outside table</div>
|-

|-

|-

|}

however gives

<div>Text outside table</div>
<p><br></p>
<p><br></p>
<p><br></p>
<table class="wikitable"></table>

Why does each empty row after the div now suddenly generate a paragraph with just a line break in it?
Comment 1 Andre Klapper 2013-01-31 14:07:06 UTC
Retesting with 1.21wmf8:

(In reply to comment #0)
> rendered as
> 
> <p><span>Text outside table</span></p>
> <table class="wikitable"></table>

Nowadays I get pretty much the same:
<div lang="en" dir="ltr" class="mw-content-ltr"><p><span>Text outside table</span></p>
<table class="wikitable"></table>

Second example:

> <div>Text outside table</div>
> <p><br></p>
> <p><br></p>
> <p><br></p>
> <table class="wikitable"></table>

Same result here:

<div>Text outside table</div>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<table class="wikitable"></table>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links