Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30704 closed defect (bug) (invalid)

Additional <br />-tags inserted into html

Reported by: gerhard-mueller's profile Gerhard Mueller Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords:
Focuses: Cc:

Description

When I enter html text in the "Text" area of the editor, <br /> tags are added to the code generated for each linebreak where plain text might be allowed.
This happens in Firefox (34.0.5) under Windows-7 (64 bit). Tried with WordPress 3.8.1 and 4.0.1.
Example:
"This is
one line"
is changed to
"This is<br />
one line"
This does not happen when the line ends with <br /> or, e.g. </td>
But it also happens when the parameters of a tag are spread over several lines.

I think it is correct to insert a <br /> into the final code when a linebreak occurs in the "Visual" area of the editor. But this must already show up in the "Text" area created on the basis of the visual input. Inserting it later is just one step too late.

A line break in the "Text" area, i.e. the area for the html code, is just a "white space" according to the rules of html, no more, no less.

Change History (2)

#1 @SergeyBiryukov
10 years ago

A line break in the "Text" area, i.e. the area for the html code, is just a "white space" according to the rules of html, no more, no less.

The Text editor is not designed to be a "real" HTML editor and should not be considered as such, see #20993.

#2 @iseulde
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from 4.0.1 to 4.0

See above comment.

Note: See TracTickets for help on using tickets.