Subject: | Empty tags cause errors |
The formatting routine does not handle empty HTML tags correctly, but
such tags can occur in the Wikitext. Example: <references/> (which is
not in the default list of allowed tags, btw).
Just adding e.g. "references/" to the list of allowed tags is not
sufficient either, since that will mess up the sequence of tags and any
*following* allowed HTML tag will be regarded as and converted to text.
A way that seems to work is the following: right after the creation of
the HTML::Parser object in MediawikiFormat.pm do
$parser->empty_element_tags(1);
This will make the HTML::Parser recognize empty tags and create event
pairs for opening/closing that tag.