# Mautic 5.0.3 - Characters in certain button labels and config values are being encoded

**URL:** <https://forum.mautic.org/t/mautic-5-0-3-characters-in-certain-button-labels-and-config-values-are-being-encoded/30907>\
**Category:** Mautic 5 Install/Upgrade Support\
**Tags:** mautic-5\
**Created:** [February 15, 2024, 8:48pm UTC](https://forum.mautic.org/t/mautic-5-0-3-characters-in-certain-button-labels-and-config-values-are-being-encoded/30907 "2024-02-15T20:48:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 15, 2024, 8:48pm UTC](https://forum.mautic.org/t/mautic-5-0-3-characters-in-certain-button-labels-and-config-values-are-being-encoded/30907/1 "2024-02-15T20:48:58Z")

</div>

**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](https://forum.mautic.org/t/troubleshooting-mautic-5-0-3-upgrade-sparkpost-plugin-issues-and-character-escaping-errors/30906/1)) 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 &amp; Close” which is a minor issue.

![chrome_2024-02-16_07-53-13](https://us1.discourse-cdn.com/flex020/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://us1.discourse-cdn.com/flex020/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)

---

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 15, 2024, 9:11pm UTC](https://forum.mautic.org/t/mautic-5-0-3-characters-in-certain-button-labels-and-config-values-are-being-encoded/30907/2 "2024-02-15T21:11:48Z")

</div>

I was able to fix the first “Save &amp; Close” button label above by modifying the messages.ini translations file at;

`translations/en_GB/CoreBundle/messages.ini`

Changed the line:

```auto
mautic.core.form.saveandclose="Save &amp; Close"

```

to

```auto
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.

---

<div class="post-metadata">

**Author:** ![tacester](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tacester](https://forum.mautic.org/u/tacester)\
**Post date:** [February 15, 2024, 10:21pm UTC](https://forum.mautic.org/t/mautic-5-0-3-characters-in-certain-button-labels-and-config-values-are-being-encoded/30907/3 "2024-02-15T22:21:40Z")

</div>

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](https://github.com/mautic/mautic/issues/12653)

I opened a bug regarding the second issue…

[JSON value custom email header values are being html encoded on save](https://github.com/mautic/mautic/issues/13387)

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…

```auto
$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',
                ]
            )
        );

```
