Your software
My Mautic version is: 5.0.3
My PHP version is: 8.0.30
My Database type and version is: MySQL 8.0.33
Your problem
My problem is:
Yesterday I upgraded from Mautic 4.4.10 to 5.0.3 in a test environment and seem to be experiencing issues with characters being escaped in unusual places. I touched on it in an earlier post (Mautic 5.0.3 Sparkpost plugin issues) which wasn’t directly related, so I thought it deserved its own post.
I first noticed the issue on all of the “Save & Close” buttons, appearing as “Save & Close” which is a minor issue.
![chrome_2024-02-16_07-53-13](https://global.discourse-cdn.com/business7/uploads/mautic/original/2X/b/b94058db26e6efef407e4e84e5cda141452e4f92.png)
It becomes more problematic as it appears to be effecting certain configuration values, in particular I’ve noticed the values in custom email headers being encoded…
![chrome_2024-02-16_07-45-09](https://global.discourse-cdn.com/business7/uploads/mautic/original/2X/6/62cee6ad1f7f76cb473a1f3a8d993a4bb81f8caa.png)
Is anybody else experiencing this?
These errors are showing in the log:
none
Steps I have tried to fix the problem:
Checked default_charset = “UTF-8” in php.ini (which it already was)
I was able to fix the first “Save & Close” button label above by modifying the messages.ini translations file at;
translations/en_GB/CoreBundle/messages.ini
Changed the line:
mautic.core.form.saveandclose="Save & Close"
to
mautic.core.form.saveandclose="Save & Close"
I am new to this so I am not sure if this is the right way to solve this.
I found a closed bug for the Save & Close button issue… Not sure why it was still a problem in my instance… perhaps something to do with the way Mautic is updated from 4.4 to 5.
Save & Close button showing & in translations
I opened a bug regarding the second issue…
JSON value custom email header values are being html encoded on save
My work around for the second issue is to comment out the mailer_custom_headers
line below in the file app/bundles/EmailBundle/Form/Type/ConfigType.php
is a quick interim fix…
$builder->addEventSubscriber(
new CleanFormSubscriber(
[
'mailer_from_email' => 'email',
'mailer_return_path' => 'email',
'default_signature_text' => 'html',
'unsubscribe_text' => 'html',
'unsubscribe_message' => 'html',
'resubscribe_message' => 'html',
'webview_text' => 'html',
// Encode special chars to keep congruent with Email entity custom headers
//'mailer_custom_headers' => 'clean',
]
)
);