Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#19462 closed defect (bug) (wontfix)

Visual Editor Preserving Whitespace Instead of Stripping It

Reported by: lincolnadams's profile lincolnadams Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

When using the Visual Editor, double spacing and beyond (otherwise known as whitespacing) is preserved. The expected behavior is that these whitespaces, intentional or not are stripped accordingly to conform to XHTML standards, with only preformatted text being the exception.

This behavior is particularly observed by those who double space between sentences, where the Visual Editor adds an invisible   after the first space.

Change History (2)

#1 @SergeyBiryukov
12 years ago

  • Component changed from General to TinyMCE

#2 @azaozz
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This is actually the default behavior in contenteditable mode in the browsers (not done by TinyMCE). Every other space is converted to  , so typing 6-7-8 spaces will be maintained and show on the front-end the way the user typed it.

We can strip the extra spaces but not sure if this is the right think to do. Closing as wontfix for now, feel free to reopen with examples/user cases confirming why the default browser behavior should be changed.

Version 0, edited 11 years ago by azaozz (next)
Note: See TracTickets for help on using tickets.