# Bug on Email

**URL:** <https://forum.mautic.org/t/bug-on-email/26534>\
**Category:** Development\
**Created:** [December 28, 2022, 3:15pm UTC](https://forum.mautic.org/t/bug-on-email/26534 "2022-12-28T15:15:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miamiman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/miamiman/32/1118_2.png) [@miamiman](https://forum.mautic.org/u/miamiman)\
**Post date:** [December 28, 2022, 3:15pm UTC](https://forum.mautic.org/t/bug-on-email/26534/1 "2022-12-28T15:15:45Z")

</div>

Mautic 4.4.0

When you declare the html with \< !DOCTYPE html \> and save, the doctype declaration duplicates itself.

If you save often enough, you get a header full of \< !DOCTYPE html \> s.

I delete but the least I can get is two.

Anyone else see this?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 29, 2022, 7:59am UTC](https://forum.mautic.org/t/bug-on-email/26534/2 "2022-12-29T07:59:16Z")

</div>

Connected to this?

> <https://github.com/mautic/mautic/issues/11743>
>
> \### Mautic Version
> 
> 4.4.x series
> 
> \### PHP version
> 
> 7.4.33
> 
> \### What brow…sers are you seeing the problem on?
> 
> Not relevant
> 
> \### What happened?
> 
> Creating a new email from the Blank template within the grapes.js editor shows this layout:
> 
> \<!DOCTYPE html\>
> \<head\>\</head\>
> \<body\>\</body\>
> 
> I think it should be using:
> 
> \<!DOCTYPE html\>
> \<html\>
> \<head\>\</head\>
> \<body\>\</body\>
> \</html\>
> 
> albeit the tag \`\<html\>\` is optional for \`\<!DOCTYPE html\>\` (see: https://html.spec.whatwg.org/multipage/syntax.html#optional-tags ) we should enable to set it explicitly if we want to make the markup as clear as possible.
> 
> The real problem is that if I insert the \`\<html\>\` tag in the code and save, it then disappears.
> 
> I'm ready to contribute if the team accepts this is good, and point me out where's to touch.
> 
> \### How can we reproduce this issue?
> 
> Create an email, from Blank template.
> Edit with grapejs.
> Open the code.
> Insert \`\<html\>\` before the \`\<head\>\` and \`\</html\>\` after the \`\</body\>\`.
> Save.
> Re-open.
> The \`\<html\>\` tags have disappeared.
> 
> \### Relevant log output
> 
> \_No response\_
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://app.bountysource.com/issues/114275249-the-blank-template-is-missing-the-html-tag?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://app.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

---

<div class="post-metadata">

**Author:** ![miamiman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/miamiman/32/1118_2.png) [@miamiman](https://forum.mautic.org/u/miamiman)\
**Post date:** [December 29, 2022, 1:12pm UTC](https://forum.mautic.org/t/bug-on-email/26534/3 "2022-12-29T13:12:15Z")

</div>

> [@miamiman](#):
>
> \< !DOCTYPE html \>

I have included a screen shot.

Every time you \< save \> in code mode, as long as you have declared the doctype, it duplicates itself. You end up with a stream of repeating doctypes.

Am I the only one seeing this?

 ![Screenshot 2022-12-29 at 08-08-01 Edit Email - KNX - Newsletter Quarterly AR Mautic](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/942423ba736330aeb34f4401ace2de3892c599ed.png)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 29, 2022, 2:44pm UTC](https://forum.mautic.org/t/bug-on-email/26534/4 "2022-12-29T14:44:04Z")

</div>

Oh, this is the legacy builder.  
Sorry, I don’t know I’m not using it anymore for two years.
