You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed today that the plain text field strips out the em dash character on save because when it serializes the value it passes the value through LitEmoji::unicodeToShortcode. This is a problem because we're using a text field with a drop down to construct a title for a particular entry type, and the text field should allow em dashes (and probably other utf-8 charachters) like the native title field. Em dashes are persisted when used in the native title field.
Steps to reproduce
Create a plain text field.
Put some text in it with an em dash character.
Save the entry and see that the em dash character is removed.
Expected behavior
Em dashes (and probably other unicode characters) should not be filtered out when saving a plain text field.
Actual behavior
Em dashes are filtered out when saving a plain text field.
Craft CMS version
4.4.1
PHP version
8.1.7
Operating system and version
No response
Database type and version
Mysql 8.0.31
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
Thanks for reporting. Various other punctuation characters are also affected by this. There’s also an open issue for this in elvanto/litemoji GitHub (link). We’ll discuss options internally, and once I have more info, I’ll update this issue again.
What happened?
Description
Noticed today that the plain text field strips out the em dash character on save because when it serializes the value it passes the value through
LitEmoji::unicodeToShortcode
. This is a problem because we're using a text field with a drop down to construct a title for a particular entry type, and the text field should allow em dashes (and probably other utf-8 charachters) like the native title field. Em dashes are persisted when used in the native title field.Steps to reproduce
Expected behavior
Em dashes (and probably other unicode characters) should not be filtered out when saving a plain text field.
Actual behavior
Em dashes are filtered out when saving a plain text field.
Craft CMS version
4.4.1
PHP version
8.1.7
Operating system and version
No response
Database type and version
Mysql 8.0.31
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: