Emojis in Trial Break Saving

Issue #196 resolved
Enthalpy created an issue

If you include a unicode emoji in your trial and attempt to save, trial content validation will report a different number of characters received vs sent.

On editor_save.js, send the length with [...contents].length rather than contents.length, per <https://stackoverflow.com/a/49599723.> The built-in length method uses UTF-16 encoding, but the PHP layer takes its count in UTF-8. This breaks on emojis. save.php needs to use the same trick.

Comments (1)

  1. Log in to comment