Make WordPress Core

Opened 20 years ago

Closed 17 years ago

#4041 closed defect (bug) (duplicate)

Some HTML (br and empty p tags) stripped when opening post in editor.

Reported by: mellis Owned by:
Priority: normal Milestone:
Component: Administration Version: 2.2
Severity: normal Keywords: autop
Cc: Focuses:

Description

I edited a post in the code view of the editor and manually inserted a <br /> tag in order to create some extra white space. When I saved the post, the tags were removed. Then I tried to insert <p>&nbsp;</p> and clicked "save and continue editing". The extra space appeared in the post preview, but when I clicked on the code tab of the editor, the tags had disappeared. If I clicked "save and continue editing" again, the space and tags were gone.

I'm guessing that Wordpress (perhaps the visual editor in particular) is automatically stripping these "empty" tags. Since, however, I've manually inserted them into the HTML of the post, I consider this behavior a bug (especially as I don't see any options for turning off the visual editor). Is there any way to prevent Wordpress from modifying my HTML?

Change History (4)

#1 @foolswisdom
20 years ago

  • Milestone 2.4 → 2.3
  • Version → 2.2

WORKAROUND: Enter "&nbsp;<br />" each time.

Relates to ​Idea: Let us force a line break

#2 in reply to: ↑ description @bentrem
19 years ago

Replying to mellis:

I edited a post in the code view of the editor and manually inserted a <br /> tag

[...]

I'm guessing that Wordpress (perhaps the visual editor in particular) is automatically stripping these "empty" tags.

This is one of a flock of such complaints, here and in Support.
If there isn't a general ticket maybe there should be.
If there is then this one should be ?what? closed or whatevuh.

#3 @lloydbudd
19 years ago

  • Keywords autop added

#4 @Denis-de-Bernardy
17 years ago

  • Milestone 2.9
  • Resolution → duplicate
  • Status new → closed

there's a dup of this one in the formatting component

Note: See TracTickets for help on using tickets.