Spaces after links removed in some template expansions
Closed, ResolvedPublic


Author: gareth.rees

See for example [[Rosales]]: in the "Families" section of the box at upper right, spaces are
missing following links. For example, the wikitext "[[Urticaceae]] ([[nettle]] family)" has been
rendered as Urticaceae(nettlefamily).

This doesn't happen in ordinary wikitext, only in the expansion of Template:Taxobox.

If the spaces are replaced by non-breaking space ( ) then the box renders correctly.

Version: unspecified
Severity: major

bzimport set Reference to bz4830.
bzimport created this task.Via LegacyFeb 2 2006, 12:19 AM
bzimport added a comment.Via ConduitJun 7 2006, 9:18 PM

gareth.rees wrote:

Any chance of this being fixed? It affects hundreds of articles. See
for a complaint.

brion added a comment.Via ConduitJun 7 2006, 9:28 PM

Will take a look at this while I'm knee-deep in parser guts...

bzimport added a comment.Via ConduitJun 8 2006, 8:00 PM

gareth.rees wrote:

Thank you.

brion added a comment.Via ConduitJun 9 2006, 11:03 AM

The problem appears to be that the taxobox template uses a bogus
inner nested table that, when it comes down to it, looks like this:

[[Cannabaceae]] ([[hemp]] family)


Notice that there's no | to mark the text as being in a
table cell. The current wikitable parser is very lax about
this sort of thing, and renders it to bad HTML, something like:

Bad table syntax (expected rows <tr>...</tr>) near: <a href="/oneseven/index.php?title=Cannabaceae" title="Cannabaceae">Cannabaceae</a> (<a href="/oneseven/index.php?title=Hemp" title="Hemp">hemp</a> family) <tr><td></td></tr>

HTML Tidy then tries to clean up the code; it notices the
inline text illegally placed into a <table> directly, and
moves it to a paragraph outside the table:

Tidy normalizes this to:
<p><a href="/oneseven/index.php?title=Cannabaceae" title="Cannabaceae">Cannabaceae</a>(<a
href="/oneseven/index.php?title=Hemp" title="Hemp">hemp</a>family)</p>

Mysteriously it also removes the whitespace at the edge
of the link tags, but the construct is wrong to begin with
so it can't be faulted too much. :)

I've corrected the template:

bzimport added a comment.Via ConduitJun 15 2006, 11:42 AM

stacey.nj wrote:

Brion, the change you made to the taxobox has made additional problems. If the
subdivision part of the box contains a bulleted list, the first asterisk does
not get wikified into a bullt. If the subdivision part contains a break-line
list, there is a gap between the first and second lines. See [[lemur]] and
[[Cheirogaleidae]] for examples respectively. - UtherSRG

brion added a comment.Via ConduitJun 15 2006, 8:01 PM

Then you'll need to fix those uses.

Add Comment