Special characters in fields being encrypted are converted when entity is updated

Created on 19 April 2016, almost 10 years ago
Updated 12 March 2025, 11 months ago

Hi,

We are using field encryption module to encrypt our users fields and a custom entity's fields.
now when the entity is being created via web form, the fields values are saved correctly. If there is a special character in field value the 'value' key is having exact value and 'safe value' key has the value with special char converted to HTML entities like '&amp'
the issue happens when I am updating just a date field of this entity via entity load and entity save() functions, this time the value gets the HTML converted values i.e. '&amp' and safe value gets '&amp' converted to &ampamp;
now in views the field values are showing incorrect.
When I unchecked the Encrypt option via field settings, no matter how many times I am updating any value of entity the 'value' key of field will always have the exact entered value I.e. no HTML conversion.
Please help.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇮🇳India ritu.nalashaa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024