Non-breaking space broken after <pre>
Closed, ResolvedPublic

Description

Author: omniplex

Description:
Non-breaking space in all its forms should be rendered as &#160;
(working with all browsers I'm aware of) or &nbsp; (issues with
one old browser if there are two or more adjacent &nbsp;).

Under absolutely no circumstances can &nbsp; / &#160; / &#x00A0;
or the corresponding UTF-8 be rendered as mere SP, that causes
havoc. This appears to be relatively new (2006-04-13 maybe?).

I've tested it elsewhere with action=render, it's no skin issue.


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/User:Omniplex/5569

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz5569.
bzimport created this task.Via LegacyApr 14 2006, 10:18 AM
bzimport added a comment.Via ConduitApr 14 2006, 10:51 AM

omniplex wrote:

Whatever it is, it's not everywhere.

bzimport added a comment.Via ConduitApr 14 2006, 11:22 AM

omniplex wrote:

I've tracked it down in http://en.wikipedia.org/wiki/User:Omniplex/5569

Theory: On a page with <pre>...</pre> later occurences of
nbsp or #160 are translate to a space. An empty <pre></pre>
doesn't have this side-effect.

The example was in a discussion about another <pre> oddity
at the bottom of:

http://en.wikipedia.org/wiki/Wikipedia_talk:Qif_conditionals#m:ParserFunctions

Something with <pre> is odd. And that's not new, I always
(this year) avoided it, because it doesn't behave like a
normal XHTML <pre>.

brion added a comment.Via ConduitApr 14 2006, 11:02 PM

Please provide example input and output, clearly labeled.

bzimport added a comment.Via ConduitApr 15 2006, 12:09 PM

omniplex wrote:

Broken after <pre> </pre>:
http://en.wikipedia.org/w/index.php?title=User:Omniplex/5569&oldid=48404599

Okay after <pre></pre>:
http://en.wikipedia.org/w/index.php?title=User:Omniplex/5569&oldid=48404643

JFTR I added an example for the other <pre> oddity,
where it affects text on the same line before <pre>:
http://en.wikipedia.org/w/index.php?title=User:Omniplex/5569&oldid=48558136

brion added a comment.Via ConduitApr 16 2006, 7:33 AM

Probably a bug in tidy. Can reproduce locally only with tidy enabled.

brion added a comment.Via ConduitApr 26 2006, 2:29 AM
  • Bug 5717 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitMay 30 2006, 11:24 PM

omniplex wrote:

This hits me about once per day, and there's absolutely no workaround,
therefore I mark it as "serious". It's easy to avoid all &lt;pre&gt;
and Wiki "space in column one" on a new page, but a PITA on old pages
if I want &nbsp; to work as designed.

It breaks my signature. It breaks templates like Tlx and Tlsp. It breaks
dummy &nbsp; table cells.

brion added a comment.Via ConduitJun 17 2006, 6:34 PM
  • Bug 6339 has been marked as a duplicate of this bug. ***
brion added a comment.Via ConduitJun 24 2006, 11:30 PM
  • Bug 6430 has been marked as a duplicate of this bug. ***
brion added a comment.Via ConduitJul 18 2006, 5:42 AM
  • Bug 6725 has been marked as a duplicate of this bug. ***
daniel added a comment.Via ConduitJul 18 2006, 6:50 PM

Created attachment 2122
test case to reproduce the problem with tidy on the command line

I can verify the bug (directly on the command line) with the tidy version "HTML
Tidy for Linux/x86 released on 1st March 2004": After the <pre>-block, all
&nbsp; are replaced by regular space. This is fixed in newer versions of tidy:
the problem is gone in version "HTML Tidy for Linux/x86 released on 1 September
2005".

Attached: test.html

bzimport added a comment.Via ConduitJul 25 2006, 7:10 PM

ayg wrote:

This breaks <poem> tags too (see [[s:en:Help:Editing poetry]]).

bzimport added a comment.Via ConduitOct 12 2006, 6:23 AM

ayg wrote:

This is because Tidy hasn't been updated, not a MediaWiki problem. MediaWiki ->
Wikimedia.

bzimport added a comment.Via ConduitJan 7 2007, 11:40 PM

erikbaas wrote:

This bug breaks pages and templates on Dutch WP too: [[s:nl:Gebruiker:Erik
Baas/5569]]

bzimport added a comment.Via ConduitApr 7 2007, 10:13 PM

erikbaas wrote:

The problem seems to have disappeared; see
http://nl.wikipedia.org/wiki/Gebruiker:Erik_Baas/5569

bzimport added a comment.Via ConduitApr 8 2007, 1:44 AM

ayg wrote:

Should have been fixed by Tim upgrading Tidy.

Add Comment