Last modified: 2007-04-08 01:44:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5569 - Non-breaking space broken after <pre>
Non-breaking space broken after <pre>
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: 5717 6339 6430 6725 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-04-14 10:18 UTC by omniplex
Modified: 2007-04-08 01:44 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

test case to reproduce the problem with tidy on the command line (433 bytes, text/html)
2006-07-18 18:50 UTC, Daniel Kinzler

Description omniplex 2006-04-14 10:18:12 UTC
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.
Comment 1 omniplex 2006-04-14 10:51:25 UTC
Whatever it is, it's not everywhere.
Comment 2 omniplex 2006-04-14 11:22:34 UTC
I've tracked it down in

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:

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>. 

Comment 3 Brion Vibber 2006-04-14 23:02:32 UTC
Please provide example input and output, clearly labeled.
Comment 4 omniplex 2006-04-15 12:09:50 UTC
Broken after <pre> </pre>:

Okay after <pre></pre>:

JFTR I added an example for the other <pre> oddity,
where it affects text on the same line before <pre>:

Comment 5 Brion Vibber 2006-04-16 07:33:27 UTC
Probably a bug in tidy. Can reproduce locally only with tidy enabled.
Comment 6 Brion Vibber 2006-04-26 02:29:15 UTC
*** Bug 5717 has been marked as a duplicate of this bug. ***
Comment 7 omniplex 2006-05-30 23:24:15 UTC
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.
Comment 8 Brion Vibber 2006-06-17 18:34:26 UTC
*** Bug 6339 has been marked as a duplicate of this bug. ***
Comment 9 Brion Vibber 2006-06-24 23:30:49 UTC
*** Bug 6430 has been marked as a duplicate of this bug. ***
Comment 10 Brion Vibber 2006-07-18 05:42:23 UTC
*** Bug 6725 has been marked as a duplicate of this bug. ***
Comment 11 Daniel Kinzler 2006-07-18 18:50:16 UTC
Created attachment 2122 [details]
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
Comment 12 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-25 19:10:03 UTC
This breaks <poem> tags too (see [[s:en:Help:Editing poetry]]).
Comment 13 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-10-12 06:23:54 UTC
This is because Tidy hasn't been updated, not a MediaWiki problem.  MediaWiki ->
Comment 14 Erik Baas 2007-01-07 23:40:46 UTC
This bug breaks pages and templates on Dutch WP too: [[s:nl:Gebruiker:Erik
Comment 15 Erik Baas 2007-04-07 22:13:46 UTC
The problem seems to have disappeared; see
Comment 16 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-08 01:44:36 UTC
Should have been fixed by Tim upgrading Tidy.

Note You need to log in before you can comment on or make changes to this bug.