Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#35933 closed defect (bug) (invalid)

[embed] always renders in visual editor, even if wrapped in either <code> or <pre>

Reported by: mike_vl's profile mike_vl Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords:
Focuses: Cc:


Context: I am working on the WordPress documentation project.

In the post editor, in text mode, if you wrap [embed] in <pre>, <code> or convert the brackets to html entities, the <pre>and <code> tags are removed and the editor will render the embed. I've searched if there is a bugreport, but havent't found one.

Use case:
Insert the code below:


in text mode, switch to visual editor and back.
Either just the opening pre, code tags are removed of both the opening and closing pre, code tags are removed. If you then switch to visual editor the embed is rendered.

Use case
First convert the brackets to html entities and then wrap it in <pre> or <code>, like so:


switching from text editor to visual editor and back. The html entities will be converted to regular brackets and once again the embed will be rendered in the visual editor.

I have tested on multiple installs (different versions of WordPress and different domains/serverconfigurations)

Change History (2)

#1 @mike_vl
8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Closed. I was informed that shortcodes should be escaped with double brackets



#2 @netweb
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.