[wp-trac] [WordPress Trac] #31157: TinyMCE inserts non-breaking spaces in unwanted places

WordPress Trac noreply at wordpress.org
Wed Jan 28 20:44:40 UTC 2015


#31157: TinyMCE inserts non-breaking spaces in unwanted places
--------------------------+-----------------------------------------
 Reporter:  nonverbla     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  4.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript, administration
--------------------------+-----------------------------------------

Comment (by nonverbla):

 a quick workaround until this is solved (of course less then ideal, since
 all the nbsp; stay in the database)
 {{{
 function remove_nonbreakin_spaces($string) {
         // the non-breaking space character, got you!
         // http://www.utf8-chartable.de/unicode-
 utf8-table.pl?start=128&number=128&utf8=string-literal&unicodeinhtml=hex
         return str_replace("\xc2\xa0", " ", $string);
 }
 add_filter('the_excerpt', 'remove_nonbreakin_spaces', 99);
 add_filter('the_content', 'remove_nonbreakin_spaces', 99);
 }}}
 :

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


More information about the wp-trac mailing list