• I have found (&& fixed) the following issue:

    wp_term_taxonomy.description contains some text with substring “& nbsp ;” (SELECT * FROM wp_term_taxonomy where description like ‘%& nbsp ;%’).

    Then, your conversion (at lines 136 and 153 -> …html_entity_decode(…)…) causes the entity to be replaced as \xA0

    as long, as the resulting string (containing \xA0) is passed to wp_editor(), content field will be empty… (I didn’t search deep inside the wp_wditor function)

    my simple solution:
    $content = mb_ereg_replace(“\xA0”, ‘ ‘, $content); (to line 137 and (after shifting ->) 155

    be careful – str_replace won’t work and editor will also display empty content.

    and it works 🙂

    enjoy

    https://wordpress.org/plugins/rich-text-tags/

Viewing 1 replies (of 1 total)
  • Thread Starter tomas.k.7

    (@tomask7)

    core issue (from wp-includes/formatting.php::function wp_htmledit_pre($output)):

    var_dump(htmlspecialchars(html_entity_decode(‘A& nbsp ;A’), ENT_NOQUOTES, ‘UTF-8’ )); // –> string(0) “”

Viewing 1 replies (of 1 total)
  • The topic ‘non-breakable space issue’ is closed to new replies.