Make WordPress Core

Opened 19 years ago

Closed 15 years ago

Last modified 12 years ago

#2420 closed defect (bug) (wontfix)

nbsp entity is removed by the editor

Reported by: tardieu's profile tardieu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords: nbsp editor visual
Focuses: Cc:

Description

Even when not using the WYSIWYG editor, the "nbsp" entity (non-breakable space) is removed by WordPress even when it is manually inserted by the user. This is very important to keep it for languages such as French because good writing rules require that you insert a non-breakable space before any of ":", ";", "!" and "?".

Translating the non-breakable space into an ordinary space may lead WordPress to display the punctuation sign at the beginning of a line, which is obviously incorrect.

Change History (6)

#1 @jhodgdon
18 years ago

  • Keywords visual added
  • Milestone set to 2.2

This is partially correct, as of SVN [4984].

If you enter a non-breaking space by typing   into the Code window when editing a post, and then save the post, the non-breaking space will be there.

If you subsequently edit the post again, when you come back into the code editing window, the nbsp will be removed and converted into a regular space, and then if you save, you will lose the nbsp.

HOWEVER, if you set your user preferences to disable the Visual editor, the problem goes away (i.e. the nbsp gets preserved).

So it appears the problem lies at the point where the Visual editor reads the information from the database and puts it in the visual editing window, and then when you click on the Code tab, it is converting what you see (a plain space) back into code and losing the nbsp information.

Not sure if it is fixable. ?? I don't know much about Tiny MCE.

#2 @andy
18 years ago

  • Milestone 2.2 deleted
  • Resolution set to wontfix
  • Status changed from new to closed
  • Version 2.0 deleted

This behavior is not likely to change. Dig in and try to patch it and you'll understand why; it wouldn't be easy to explain.

Alternatively, you might suggest the ability to switch default editors without disabling the rich editor.

#3 @rob1n
18 years ago

  • Component changed from General to TinyMCE

#4 @anschitech
15 years ago

  • Cc anschitech added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

I recently stumpled across the same issue.
For me it is very inconvenient that the nbsp are removed.
I use it in formulas between the numbers and the units to prevent a line break between them.
This bug is very old, has there been an improvement on the TinyMCE since then?
Has any one an other work around then disabling the visual editor?

#5 @dd32
15 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Please do not re-open old tickets.

Submit a bug upstream to TinyMCE if you wish to retain it.

#6 @SergeyBiryukov
12 years ago

#23778 was marked as a duplicate.

Note: See TracTickets for help on using tickets.