Skip to main content
Contributor ⭐️⭐️
Jul 20, 2020 4:59 PM UTC
Question

Please allow your email engagement code editor to NOT delete this date code

In all of our product’s email footers, we provide our company copyright info. However, unlike every other HTML email editor we use for sending other emails, PX automatically deletes this HTML code that displays the current year in [YYYY] format:

<script>document.write(new Date().getFullYear())</script>

Please fix this. Thanks!

3 replies

jean.nairon
Expert ⭐️
Jul 23, 2020 6:37 PM UTC

Hi @kmalk, 

There’s a couple changes to your code that I would recommend trying. I haven’t tested this so I’m not sure if this will work or not. But… I would try including type and the semicolon at the end of getFullYear()). Here is the updated:

<script type="text/javascript">
document.write(new Date().getFullYear());
</script>

It may not work but thought I would recommend it just in case. I don’t have anything setup to officially test this so I’m not sure if it will work or not.

 

Hope this helps!

Translate
Jean
kmalkAuthor
Contributor ⭐️⭐️
Jul 23, 2020 10:12 PM UTC

Thanks for your suggestion, @jean.nairon. Unfortunately, it doesn’t work either, but I appreciate your kind offer to help! The PX code editor automatically deletes the code.

Translate
jean.nairon
Expert ⭐️
Jul 24, 2020 9:07 PM UTC

That sucks. I was really hoping it was a quick change. 

@sai_ram - this should most likely be turned into a product idea. 

Translate
Jean