# (Legacy Email builder) mautic 5 adds unexpected and copies &amp styling multiple times code when saving HTML part of email Your bug title goes here!

**URL:** <https://forum.mautic.org/t/legacy-email-builder-mautic-5-adds-unexpected-and-copies-amp-styling-multiple-times-code-when-saving-html-part-of-email-your-bug-title-goes-here/31033>\
**Category:** Product Support\
**Created:** [February 23, 2024, 1:49pm UTC](https://forum.mautic.org/t/legacy-email-builder-mautic-5-adds-unexpected-and-copies-amp-styling-multiple-times-code-when-saving-html-part-of-email-your-bug-title-goes-here/31033 "2024-02-23T13:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![e-tailors\_pm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/e-tailors_pm/32/11642_2.png) [@e-tailors\_pm](https://forum.mautic.org/u/e-tailors_pm)\
**Post date:** [February 23, 2024, 1:49pm UTC](https://forum.mautic.org/t/legacy-email-builder-mautic-5-adds-unexpected-and-copies-amp-styling-multiple-times-code-when-saving-html-part-of-email-your-bug-title-goes-here/31033/1 "2024-02-23T13:49:59Z")

</div>

**Your software**  
My Mautic version is: 5.0.3  
My PHP version is: 8.1.27  
10.3.38-MariaDB

**Your problem**  
The classic email builder adds and repeats unexpected code especialy &amp in the email every time it is saved (or cloned), which grows to the point that the email saving can crash with a JavaScript error and e-mail size will extend very hard with this evertime.

It happens with the blank template but also with own / or custom templates.

**How can we reproduce this issue?**

Step 1: Create a new email with the legacy builder.  
Step 2: Choose the default Blank or another template.  
Step 3: Modify something and save the email.  
Step 4: After saving the email check what was saved in: ##\_\_emails table to the field custom\_html  
Step 5: The content of the field custom\_html save for the future compare.  
Step 6: Open the email with Builder, modify something and save again.  
Step 7: After full saving the email check what was saved the the ##\_\_emails table to the field custom\_html and compare with previous state of the data

**Relevant log output**

 ![Scherm­afbeelding 2024-02-23 om 14.32.45](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1d24da9a99ccd0281340bc9e4f9e4c525077c030.png)  
 ![Scherm­afbeelding 2024-02-23 om 14.33.15](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/95cc1bafa29628d3207dd72da38d358ed8f2bc74.jpeg)

See also on Github: [(Legacy Email builder) mautic 5 adds unexpected and copies &amp styling multiple times code when saving HTML part of email Your bug title goes here! · Issue #13452 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/13452)
