Make WordPress Core

Opened 12 years ago

Last modified 7 years ago

#29956 new defect (bug)

Paragraphs within list items disappear in the editor when switching from text to visual and back

Reported by: brunni Owned by:
Priority: normal Milestone:
Component: Formatting Version: 4.0
Severity: normal Keywords: needs-patch needs-unit-tests
Cc: Focuses:

Description

On a fresh wordpress 4.0 in the editor when I enter

<ol>
<li>a<p>b</p>
</ol>

or

<ol>
<li>a

b
</ol>

and switch from text to visual and back, I get

<ol>
<li>ab</li>
</ol>

Change History (4)

This ticket was mentioned in ​Slack in #core by jorbin. ​View the logs.


11 years ago

#2 @jorbin
11 years ago

@iseulde - Could you take a look here. I was able to replicate it. It seems to work going into tinymce, but when switching out of tinymce, the paragraph tag is lost.

#3 @iseulde
11 years ago

  • Focuses javascript added
  • Keywords needs-patch needs-unit-tests added
  • Milestone Awaiting Review → Future Release

This is an auto-p bug.

switchEditors._wp_Nop( '<ol><li>a<p>b</p></li></ol>' );

returns

"<ol>
	<li>ab</li>
</ol>"

This file really needs some unit tests.

#4 @azaozz
11 years ago

  • Component Editor → Formatting
  • Focuses javascript removed

This is autop problem.

Note: See TracTickets for help on using tickets.