Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19936 closed defect (bug) (fixed)

two-spaces after period - nbsp goes in the wrong place

Reported by: jaddle's profile jaddle Owned by: azaozz's profile azaozz
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:

Description

When you enter two spaces (as, right or wrong, many people do after a period) in the visual editor, wordpress converts it to 'space + unicode_nbsp'. This mostly works fine, except that if the next sentence starts a newline, it will be indented by one space. The nbsp is 'attached' to the following sentence, in other words.

A better solution would be to put the nbsp BEFORE the normal space, so that the nbsp would be attached to the period. The problem would still occur with right or full-justified text, but this is less common than left-justified text.

Of course, many people will say that the real solution is to not (ab)use nbsp in this way, and to ignore double-spaces just like html normally would. I personally agree with this wholeheartedly, but some people are very attached to their double-spaces after sentences...

I've attached an html files that demonstrates the html that wordpress produces. Try opening it and then resizing your browser window until "There they go" moves to a second line, and you will see that it is indented slightly.

Attachments (1)

nbsp-bug.html (111 bytes) - added by jaddle 13 years ago.
Illustrating wrapping issues with nbsp

Download all attachments as: .zip

Change History (6)

@jaddle
13 years ago

Illustrating wrapping issues with nbsp

#1 @thee17
13 years ago

  • Component changed from General to TinyMCE

I think this is a TinyMCE issue any should probably be better reported to http://www.tinyMCE.com/develop/bugtracker.php

#2 @jaddle
13 years ago

Interesting - I just tried the tinyMCE at http://www.tinymce.com/tryit/full.php and it DID put the nbsp first, followed by the normal one. That uses tinyMCE 3.4.7, and the latest wordpress (3.3.1) has 3.4.2, I believe, so maybe it is something that has been fixed. I don't see anything in the tinyMCE changelog or bug tracker that describes that change.

I've never used tinyMCE outside of wordpress though, so I haven't done a very thorough search on the site.

Is it possible to just drop the new version of tinyMCE into an existing wordpress to try it out?

#3 @BrianEnigma
13 years ago

  • Cc BrianEnigma added

#4 @azaozz
13 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In [19830]:

Update TinyMCE to 3.4.8, fixes #19969, fixes #19936, fixes #19741

#5 @ocean90
13 years ago

  • Milestone changed from Awaiting Review to 3.4
Note: See TracTickets for help on using tickets.