Spaces after links removed in some template expansions
Closed, ResolvedPublic

Description

Author: gareth.rees

Description:
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
URL: http://en.wikipedia.org/w/index.php?title=Rosales&oldid=37293863

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 http://en.wikipedia.org/w/
index.php?
title=Wikipedia_talk:WikiProject_Tree_of_Life&curid=1272975&diff=57416194&oldid=57415216
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:
http://en.wikipedia.org/w/index.php?title=Template:Taxobox&diff=57684420&oldid=56008320

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

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.