Hello,
Over the past week I have been attempting to code some new emails templates by cloning an existing template and then making code modifications to the twig files etc. I then create a segment email, open the custom theme and see what it looks like in the grapesjs wysiwyg builder. Once the email looks ok in the builder I go on to actually send the email to various email clients to see what they look like after being delivered.
Is there is an easier way of developing themes then I would love to hear your technique ?
Now the templates are coded in mjml which is simple enough however if you try and do anything more basic than adding or removing sections, columns and text etc then the likelyhood is that the builder sanitises or strips away much of any added advanced code. After a few days of head scratching why changes were not working I compared the code in the builder mjml and html windows and some of the customisation were no were to be seen in the html. A eureka moment.
And when you go on to actually send an email I think there is more sanitisation goes on in the background before the email is sent so adding just html code is not the answer either.
I understand that Mautic may do this sanitisation for security reasons however there is no clear indication that this sanitisation is occurring behind the scenes unknown to a new Mautic developer like me And I have to say its been a frustrating few days. No one would use a c compiler that removed code from the executable without giving some sort of fatal warning etc. Code sanitisation without a clear warning is ridiculous in my view.
I would please ask the developers for two things. Firstly issue a warning when you open the builder stating code can be sanitized and secondly a switch in the Mautic configuration so that we can turn this sanitisation feature completely off in an upgrade safe way. In the meantime I’m going to find a way to turn it off in the code. Any help would be welcome
Thanks.