[wp-trac] [WordPress Trac] #31297: Convert non-breaking spaces to HTML entities on editor switch

WordPress Trac noreply at wordpress.org
Wed Feb 11 14:23:42 UTC 2015


#31297: Convert non-breaking spaces to HTML entities on editor switch
----------------------------+-----------------------------
 Reporter:  Kau-Boy         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  TinyMCE         |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 == The issue: ==

 When you copy some text from a website or document, that uses non-breaking
 spaces (\u00a0) and you paste such text into the "Visual" editor, they
 will be correctly translated into an ` ` HTML entity. But if you than
 switch to the "Text" editor, those non-breaking spaces, a user cannot see
 that the pasted text has some of these non-breaking characters.

 On a website, an author pasting text was wondering, why the text had some
 unexpected linebreaks. As he couldn't see the non-breaking spaces, he had
 explanation for that.

 == Possible solutions: ==

 I see two different solution:

 1. Convert the non-breaking space to it's HTML entity (as I do in the
 patch), so the user is able to identify those space, so he can decide
 whether he want to replace them with oridnary spaces or leave them as is.

 2. Add the visualchars plugin so the user can view invisible character and
 delete the non-breaking spaces both from the "Visual" and the "Text"
 editor.

 Solution 1 has the drawback, that the spaces are not converted, if the
 user is pasting the text into the "Text" editor. But that is also the case
 in the current default TinyMCE version and users using the "Text" editor
 are usually more advanched users who might now about such spaces.

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


More information about the wp-trac mailing list