Hi,

In some situations " " is not being replacing with " ", so the count is wrong, not sure why but i solve it replacing this line:
input = input.replace(" ", ' ');
with this one:
input = input.replace(/ /gi, ' ');

and now it is working fine. I am using TinyMCE & WYSWYG.

Patch included.

CommentFileSizeAuthor
maxlength-20120320-html_spaces.diff693 bytesdavid.gil

Comments

cedewey’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

We are only maintaining the Drupal 7 version of the module for critical security fixes, so I'm marking this Closed (won't fix). Thank you for working on this issue. If you do want to maintain the Drupal 7 version, do reach out. We'd be happy to bring you on board as a maintainer.

I also encourage you, if you haven't already, to upgrade your site to Drupal 8/9. We are actively maintaining that version and you would enjoy all of the other features of the latest version of Drupal.