[Mediawiki-l] Nested Table Caption bug

Randall Hopper viznut at charter.net
Sun Nov 27 17:57:54 UTC 2005


     I've noted a problem with our wiki at work where some nested tables
will not print, even though they're displayed in the browser (Firefox 1.0.7).

     The underlying cause is that when you define nested tables in
Mediawiki, in the generated HTML the <caption> on the outer table is never
closed.

     For example:

     {| border="0" cellpadding="3" align="center"
     |+ '''TABLE 1<br>Age of the Universe...'''
     {| border="1" cellpadding="2" cellspacing="0" align="center"
     |+ '''(Table 1a Caption)'''
     |- bgcolor="#dfdfdf"
     !  Header1 !! Header2 !! Header3 !! Header4
     |- align="right"
     |  1 || 2 || 3 || 4
     |}
     ||
     {| border="1" cellpadding="2" cellspacing="0" align="center"
     |+ '''(Table 1b Caption)'''
     |- bgcolor="#dfdfdf"
     !  Header1  !! Header2 !! Header3 !! Header4
     |- align="right"
     |  5 || 6 || 7 || 8
     |}
     |}

Drop this into a wiki, and then View Source.  You can see the first
<caption> is never closed:

     <!-- start content -->
     <table border="0" cellpadding="3" align="center">
     <caption> <b>TABLE 1<br />Age of the Universe...</b>

     <table border="1" cellpadding="2" cellspacing="0" align="center">
     <caption> <b>(Table 1a Caption)</b>
     </caption>

This is on Mediawiki 1.4.7 (Gentoo Linux 1.4.16).

Has this by chance been fixed in a later version of Mediawiki?

Thanks,

Randall



More information about the MediaWiki-l mailing list