In Drupal 9, this module does not work if the filter is called after the "Limit allowed HTML tags and correct faulty HTML" filter as run, since it seems to be converting non-breaking spaces html-encoded as   to UTF-8 characters, so the regex is not matching the character or replacing them.

Either this module should make a note that it needs to be run before the other filters, or the regex needs to be changed to match UTF-8 encoded non-breaking spaces as well.

Issue fork no_nbsp-3282384

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mikemccaffrey created an issue. See original summary.

mikemccaffrey’s picture

Title: Drupal 9 Limit allowed HTML tags and correct faulty HTML interaction » Drupal 9 character encoding issue keeps filter from working
mikemccaffrey’s picture

Here is a patch to also match the non-breaking spaces if they are encoded using UTF-8.

mikemccaffrey’s picture

Status: Active » Needs review

JosefFriedrich made their first commit to this issue’s fork.

joseffriedrich’s picture

Thank you very much! I applied your patch to the 8.x-1.x and to the 7.x-1.x branch. I wait a bit until I release new stable versions.

joseffriedrich’s picture

Status: Needs review » Fixed
joseffriedrich’s picture

Status: Fixed » Closed (fixed)