[wp-trac] [WordPress Trac] #32078: TinyMCE View HTML Content in Shortcode

WordPress Trac noreply at wordpress.org
Tue May 19 16:39:39 UTC 2015


#32078: TinyMCE View HTML Content in Shortcode
-------------------------------------+-------------------------
 Reporter:  bduclos                  |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.2.3
Component:  TinyMCE                  |     Version:  4.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  javascript
-------------------------------------+-------------------------

Comment (by iseulde):

 Quick summary

 We always leave the shortcode in the content, so TinyMCE will parse it and
 generate the DOM. This is bad as invalid markup in the shortcode will be
 removed and the markers can be cut off when TinyMCE wraps HTML in P nodes.
 The solution is to replace the marker early for views that have a
 placeholder (default). Views that don't have a loader (rare) need to make
 sure the text is a string. There's also a second problem with entities
 when converting back. We replace the view with the text in the DOM, so any
 HTML will be escaped. The solution is to replace in the string, not the
 DOM.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32078#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list