Last modified: 2013-01-08 13:23:04 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 T11418, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9418 - A table within a wikitext table breaks the outermost one under some conditions
A table within a wikitext table breaks the outermost one under some conditions
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-26 08:49 UTC by Fibonacci
Modified: 2013-01-08 13:23 UTC (History)
1 user (show)

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


Attachments
Image showing how a wikitable embedded in another wikitable renders (17.84 KB, image/png)
2013-01-04 18:40 UTC, Valerie Juarez
Details
This image shows how an html table embedded in a wikitable renders (18.59 KB, image/png)
2013-01-04 18:41 UTC, Valerie Juarez
Details

Description Fibonacci 2007-03-26 08:49:37 UTC
Trying to create a table within another table, be it using wikitables or plain
HTML tables, will break the syntax of the outermost table. For example, this code:
{|
|-
| New table:
{|
| Table within a table
|} || This be a new cell
|}

As well as this code:
{|
|-
| New table: <table>
<tr><td> Table within a table</td></tr>
</table> || This be a new cell
|}

Will both render as:
<table>
<tr>
<td>New table:
<table>
<tr>
<td>Table within a table</td>
</tr>
</table>
|| This be a new cell</td>
</tr>
</table>

The || is rendered as plain text, instead of table syntax. However, it will be
rendered correctly if a line break is inserted right after the innermost table:
{|
|-
| New table: <table>
<tr><td> Table within a table</td></tr>
</table>
| This be a new cell
|}

Will render as expected:
<table>
<tr>
<td>New table:
<table>
<tr>
<td>Table within a table</td>
</tr>
</table>
</td>
<td>This be a new cell</td>
</tr>
</table>

This is especially annoying when transcluding templates which have tables
themselves, as one cannot be sure that those templates have line breaks after a
table, and is so forced to insert one.
Comment 1 Valerie Juarez 2013-01-04 18:37:45 UTC
This is still an issue. I've tried the above test cases and they behave as described above (i.e. The two cases mentioned will render a broken table, but if you move the '||' to a new line, the code will render correctly). 

I'll attach two images to show what it looks like. The images will show the code and the the table the code produces.
Comment 2 Valerie Juarez 2013-01-04 18:40:38 UTC
Created attachment 11588 [details]
Image showing how a wikitable embedded in another wikitable renders

This image shows how a wikitable embedded in another wikitable renders incorrectly and how moving '||' to another line renders the correct table.
Comment 3 Valerie Juarez 2013-01-04 18:41:30 UTC
Created attachment 11589 [details]
This image shows how an html table embedded in a wikitable renders

This image shows how an html table embedded in a wikitable renders incorrectly and how moving '||' to another line renders the correct table.
Comment 4 Andre Klapper 2013-01-08 13:23:04 UTC
[bumping Version field as per last comment - thanks for retesting]

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


Navigation
Links