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

WordPress Trac noreply at wordpress.org
Thu Jun 8 16:46:21 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:  Awaiting Review
Component:  Widgets       |    Version:  4.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Just noticed the issue this morning, after upgrading to WP 4.8 on a few
 sites.

 The new Text widget (which defaults to the Visual Editor) is occasionally
 stripping out existing code that was placed in the widget prior to the
 existence of the visual editor.

 For example, if the following code is placed in the widget via the Text
 editor:


 {{{
 <ul>
 <li><a href="#" class="location"></a>List Item 1</li>
 <li><a href="#" class="location"></a>List Item 2</li>
 </ul>
 }}}

 When the Widgets page is accessed after first updating, the Text widgets
 default to the Visual editor. This action, or switching between the two
 editors at any point, is stripping out the <a> link code (presumably
 because there isn't any text associated with it).

 Considering the old functionality of the text widget, this may present
 wide-spread issues with people who have previously used Text Widgets to
 handle basic HTML code in a way that wasn't subject to the considerations
 of a Visual editor adjusting it (as it does in Pages/Posts).

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


More information about the wp-trac mailing list