What happened?
Description
Currently there's a block on encoding emoji on the way in - Craft checks for mb4 capabilities before storing a value. However, it does not check these values when displaying the internal value in the CMS UI. As as result, the encoded value will get saved in anyway, even if you don't need or want this. This PR stops the encoding from happening when displaying an internal value too, so that the value always stays unencoded on supported databases which, in my opinion, is the correct behaviour.
Steps to reproduce
- Create a plain text field on a database that supports mb4
- Save the value
:x: in the field (just the value - github helpfully also automatically converts the shortcode!)
- View the entry in elements_sites - you will notice that the value is still
:x:
- Load the entry in the CMS UI - you will notice that the value is now ❌ but the value in the database is unchanged
Expected behavior
The value displayed at step 5 above is still :x:, and not ❌
Actual behavior
The value is ❌
Craft CMS version
5.x
PHP version
No response
Operating system and version
No response
Database type and version
mysql 8.4, utf8mb4-enabled tables
Image driver and version
No response
Installed plugins and versions
No response
What happened?
Description
Currently there's a block on encoding emoji on the way in - Craft checks for mb4 capabilities before storing a value. However, it does not check these values when displaying the internal value in the CMS UI. As as result, the encoded value will get saved in anyway, even if you don't need or want this. This PR stops the encoding from happening when displaying an internal value too, so that the value always stays unencoded on supported databases which, in my opinion, is the correct behaviour.
Steps to reproduce
:x:in the field (just the value - github helpfully also automatically converts the shortcode!):x:Expected behavior
The value displayed at step 5 above is still
:x:, and not ❌Actual behavior
The value is ❌
Craft CMS version
5.x
PHP version
No response
Operating system and version
No response
Database type and version
mysql 8.4, utf8mb4-enabled tables
Image driver and version
No response
Installed plugins and versions
No response