[wp-trac] [WordPress Trac] #35933: [embed] always renders in visual editor, even if wrapped in either <code> or <pre>

WordPress Trac noreply at wordpress.org
Wed Feb 24 12:37:38 UTC 2016


#35933: [embed] always renders in visual editor, even if wrapped in either <code>
or <pre>
--------------------------+-----------------------------
 Reporter:  mike_vl       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Context: I am working on the [https://make.wordpress.org/docs/handbook
 /about-the-docs-team/current-docs-projects/helphub/] 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:
 {{{
 <pre>[embed][/embed]</pre>
 }}}

 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:

 {{{
 <pre>[embed[[/embed[</pre>
 }}}

 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)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35933>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list