Page MenuHomePhabricator

non-breaking space doesnt work in charinsert
Closed, ResolvedPublic


<charinsert>&nbsp;</charinsert> inserts a normal space instead of a non-breaking

Best way to fix would be inserting &nbsp; (not the non-breaking space character
itself) so that page code remains easy to understand.

Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:20 PM
bzimport added a project: CharInsert.
bzimport set Reference to bz6275.
bzimport added a subscriber: Unknown Object (MLST).
  1. What doesn't work about it?
  2. Where doesn't it work?
  3. Is this your site or a Wikimedia site?
  4. What is the exact URL to the page where you encounter this


  1. What web browser, of what version, on what operating system,

are you using?

It should insert &nbsp; when clicked; it inserts a normal space character
instead. Tested under Firefox v1.06 Moox on Windows XP and Firefox 1.0 on Win98.

I didnt realize it might be a browser problem, but now I tested with IE6 and it
works fine; the HTML cource code also seems to be in order (<a
onclick="insertTags('&amp;nbsp;','','');return false" href="#">&amp;nbsp;</a>).
Anyway, the site is the hungarian Wikipedia (you can test it at the
Sandbox]), and the charinsert code is in [[Wikipédia:Edittools]] which is
included as a template into [[MediaWiki:Edittools]] (to avoid the bug with
templates expanding in charinsert).

Sorry, that should be [[hu:Wikipédia:Edittools]] and [[hu:MediaWiki:Edittools]].

This appears to be caused by the JavaScript in
MediaWiki:Monobook.js: The use of innerHTML to add a menu
triggers a bug in Firefox and Safari which damages some of
the characters.

I've changed it to use DOM functions, which add the menu
without damaging the existing items. Bugs will need to be
filed with Mozilla and Apple if they're not already there.

The JS fix:

Note that you may need to clear your cache to see the
corrected version live.