[wp-trac] [WordPress Trac] #34181: &nbsp; on a <td> disappearing when switching from Text to Visual tab

WordPress Trac noreply at wordpress.org
Tue Jul 2 12:31:44 UTC 2019


#34181:   on a <td> disappearing when switching from Text to Visual tab
--------------------------+-------------------------
 Reporter:  Inggo         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  TinyMCE       |     Version:  4.3.1
 Severity:  normal        |  Resolution:  maybelater
 Keywords:                |     Focuses:
--------------------------+-------------------------
Changes (by azaozz):

 * status:  new => closed
 * resolution:   => maybelater


Comment:

 Yes, this comes from the js autop. The ` ` is converted to U+00A0 by
 TinyMCE (it is set to do that), and U+00A0 is matched by `\s` in the autop
 regex.

 The way this can be fixed is perhaps to look at "empty"
 `<td>{U+00A0}</td>` and replace the UTF-8 char with the entity after the
 TinyMCE cleanup but before autop. Potentially this may bring some edge
 cases on the front-end, in the PHP autop.

 On the other hand this is superseded by the block editor. The Table block
 there works well and doesn't seem to have this problem, so not sure if
 it's worth it fixing for the classic editor.

 Closing as maybelater. Feel free to reopen is this is still needed/has
 common use cases.

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


More information about the wp-trac mailing list