[wp-trac] [WordPress Trac] #40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code

WordPress Trac noreply at wordpress.org
Fri Jun 9 14:12:56 UTC 2017


#40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code
--------------------------+--------------------
 Reporter:  dwrippe       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.8.1
Component:  Widgets       |     Version:  4.8
 Severity:  minor         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------

Comment (by westonruter):

 Also [https://wordpress.slack.com/archives/C02RQBWTW/p1496996890454677
 from] @samuelsidler:

 > What about a mixed solution? Create the new HTML widget, as planned, but
 also add a notification of sorts, when a user edits an existing, pre-4.8
 Text widget for the first time. Something like... "Hey, looks like you
 have a <script> tag; I've made this into an HTML widget for you." (Expand
 to other common HTML soup cases.)
 >
 > Not ideal, but prevents data loss and lets us move forward with the Text
 widget.

 To which I replied that it is similar to what is proposed in this ticket,
 but also:

 > But in that case, the suggestion is to disable the new experience
 altogether if it is an old Text widget that has the `filter` flag set to
 `false`, but the heuristics also then look at the content itself to see if
 it has `script` tag or other HTML soup that is liable to be lossy.

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


More information about the wp-trac mailing list