Last modified: 2011-11-20 18:48:13 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 6790 - Firefox non-breaking spaces bug workaround
Firefox non-breaking spaces bug workaround
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Low major with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review, testme
Depends on:
  Show dependency treegraph
Reported: 2006-07-23 08:05 UTC by Edward Chernenko
Modified: 2011-11-20 18:48 UTC (History)
3 users (show)

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

proposed solution (4.30 KB, patch)
2007-02-15 21:24 UTC, shattered

Description Edward Chernenko 2006-07-23 08:05:25 UTC
Currently Firefox browsers replace non-breaking spaces with normal spaces when
editing page. There should be a workaround on MediaWiki side: all Unicode U+00A0
spaces in article code should be replaced with another symbol (something like
U+20DE) before sending edit form to browser. When saving code, U+20DE should
become U+00A0.

Such a behavior should be enabled:
1. for Firefox users by default
2. for other users who enabled this option in their user settings

Also, that's good to replate   with U+20DE too.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-23 20:36:32 UTC
U+20DE is Combining Enclosing Square according to my character map.  Surely you
don't want a combining character to stand in for an nbsp?  In fact, you probably
don't want any valid Unicode general-use character for that; you'd want a
private-use character from the U+F0.. range, because otherwise this will eat
valid uses of the substituted character.

Arguably nobody should be using raw nbsp's in an input box anyway, since it's
horribly confusing: converting them to entities for everyone would also work. 
Is this unacceptable to anyone?
Comment 2 Edward Chernenko 2006-07-24 19:04:24 UTC
It's not so important which character to select for substitution, but we need to
save Unicode spaces anyway.

The actual reason is that there're many typographical rules in Russian Wikipedia
which require non-breaking spaces; currently we use   but it's too hard to
read article with many  -s present.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-24 19:09:16 UTC
Fair enough.  Of course, Firefox users will have to see all those boxes, which
is as bad for them.  It would be interesting to consider ways to automatically
add nbsp's during rendering in certain positions, on a per-language basis;
certainly there are many rules of that sort for English as well, and undoubtedly
other languages, which should be fairly easily to algorithmize.

This is data loss, so I'm setting severity to major.
Comment 4 shattered 2007-02-15 21:24:54 UTC
Created attachment 3229 [details]
proposed solution

safeUnicodeOutput() clone that only replaces the nbsp character.
Comment 5 DieBuche 2010-12-04 22:57:55 UTC
Still a problem with FF3.6
Comment 6 p858snake 2011-04-30 00:09:21 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 7 Sumana Harihareswara 2011-11-09 23:40:25 UTC
Thank you for the patch, shattered, and I'm sorry it's been so long and no one has responded to review your patch.  I've added the need-review keyword so developers know that it awaits review.
Comment 8 Sam Reed (reedy) 2011-11-20 18:31:44 UTC
(In reply to comment #5)
> Still a problem with FF3.6

How about FF8?
Comment 9 DieBuche 2011-11-20 18:48:13 UTC
(In reply to comment #8)
> (In reply to comment #5)
> > Still a problem with FF3.6
> How about FF8?

Yay, it's fixed. See (nbsp between 17 and km)

Upstream bug:

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