Until I just changed it, English Wikipedia's {{Sister project links}}
template - used in 2600+ of the most popular articles - relied on a
MediaWiki rendering bug.
When given the same code, mwlib simply gave up in the middle of parsing,
without issuing an error.
The code involved a <table> structure containing a complete <tr>, followed
immediately by a mediaiwiki "pipe syntax" table. (The original <table> tag
is never closed, but that doesn't matter in practice.)
For example:
<table><tr><td>Foo</td></tr>
{|
|-
|bar
|}
MediaWiki rendered this as:
<table>
<tr>
<td>Foo</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>bar</td>
</tr>
</table>
As for mwlib:
mwlib.uparser.parseString('Test',
'<table><tr><td>Foo</td></tr>\n{|\n|-\n|bar\n|}\nSome other
text').show()
Article->'Test'
Table tagname='table'
Row tagname='tr'
Cell tagname='td'
u'Foo'
mwlib gave up in the middle of parsing, meaning that articles including
this template are only parsed up until that template, and any further
content is ignored.
This particular bug needn't be fixed, but can we please ensure that
mwlib's parser outputs an error if it gives up when parsing a portion of
the markup?
- Joel
--
You received this message because you are subscribed to the Google Groups
"mwlib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/mwlib?hl=en.