WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 3 months ago

Last modified 3 months ago

#19462 closed defect (bug) (wontfix)

Visual Editor Preserving Whitespace Instead of Stripping It

Reported by: 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)

comment:1 SergeyBiryukov13 months ago

  • Component changed from General to TinyMCE

comment:2 azaozz3 months 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 thing to do. Closing as wontfix for now, feel free to reopen with examples/user cases confirming why the default browser behavior should be changed.

Last edited 3 months ago by azaozz (previous) (diff)
Note: See TracTickets for help on using tickets.