Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#6651 closed defect (bug) (invalid)

editor.js is not doing any cleanup when TinyMCE is displayed first

Reported by: pozhonks's profile PozHonks Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: TinyMCE Keywords:
Focuses: Cc:

Description

When we edit a post:
1- If the HTML editor is the first to show, and we switch to the visual editor, the script editor.js is doing a lot of cleanup, thus avoiding TinyMCE messing some codes.
2- If the visual editor is the first to show up, there is no cleanup, thus TinyMCE can alter some html codes. The script editor.js is not called to do this cleanup.

Change History (1)

#1 @azaozz
17 years ago

  • Milestone 2.5.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed

When the editor is started in Visual mode (TinyMCE) the content is passed through the php wpautop() that puts back the stripped <p> tags. The same happens when the editor is started in HTML mode and later switched to Visual mode, this time the js version of wpautop() is run that is defined in editor.js.

The output from TinyMCE is XHTML 1.0 compliant, so if there are tags/attributes that are not in XHTML 1.0, TinyMCE would replace them with the equivalents, like <font color="white"> would be <span style="color:white">, etc.

Note: See TracTickets for help on using tickets.