Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36712 new defect (bug)

Paragraph tags removed from div elements if script tag is present

Reported by: dankop's profile dankop Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.1
Component: Formatting Keywords:
Focuses: Cc:

Description

I honestly have no idea how to summarize this bug (therefore my lousy title), so I'll best skip right to how to reproduce it.

  • Get 10 paragraphs of text from Lorem Ipsum, and paste it to your visual editor.
  • Switch to the text editor and wrap the first 5 paragraphs in a div, and wrap the last 5 in a second div.
  • After the first paragraph in each div, simply write <script></script>
  • Switch between Visual and Text editor, and watch the paragraphs in the second div disappear.

For you convenience, you can copy the template from here, instead of typing it manually: http://pastebin.com/PFYj885M

If the paragraphs don't disappear after the first switch from text to visual, do it a couple of more times. I tried it on a fresh new install using the Twenty Sixteen theme.

I encountered this bug while having a couple of Instagram embeds on the same page, all of which loaded a script.

Change History (0)

Note: See TracTickets for help on using tickets.