Opened 10 years ago
Closed 10 years ago
#30704 closed defect (bug) (invalid)
Additional <br />-tags inserted into html
Reported by: | 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.
The Text editor is not designed to be a "real" HTML editor and should not be considered as such, see #20993.