and more in a single search tool across platforms. Read the announcement here. |
08/19/2022 05:28 AM
Hey all,
I'm having an issue regarding an email template where i have a tag for the type of request at hand:
<%if(task?.tasktype==1) print "Add Access" else if(task?.tasktype==2) print "Remove Access" else print "New Account"%>.
This works fine and sends without issue when i first create the template, but as soon as i have to edit it, even if i add nothing, the <> symbols gets broken down into their respective ascii code and the template sends with the whole tag instead of just the print. The other tags such as line breaks don't get broken down, is this expected behavior?
I tried enabling advanced css which changed nothing, putting content as HTML off does make the tag work even after editing but all my html tags get removed and the email sends as a mess.
Here is the result of the template on email creation:
Here is the result after editing the email template:
< gets turned into &It; and > into >
Thanks,
Solved! Go to Solution.
08/19/2022 11:51 AM
Give space after <% and if
<% if (task?.tasktype == 37)
Alternative : Use Transport - Export to export respective email
Update it & Reimport Transport - Import
08/22/2022 05:25 AM
Hey Rushikesh,
The space didn't work for me, same result as editing it without the space, broke the tag. The transport trick would save some hassle and it seemed to work, edited the json and reimported and the tag was as it should be but now the email won't send. Any idea why?
After editing and reimporting:
Thanks,
08/22/2022 05:52 AM
Nevermind I fixed it, not too sure how but it works now.
Thanks for the help.
08/21/2022 11:03 PM
@BMurphy ,
This is an expected security feature to prevent various injection attacks on existing objects. You should be able to delete the existing template and create a new one with the same name.
10/14/2022 11:16 AM
Is there an option to turn that off? Deleting a template and recreating every time a change needs to occur creates a ton of additional work. There must be a better way to go about this. I've observed this occurring even when the only change is adding/removing a recipient. This change causes us to have to search and update email on analytics, workflows, rules, endpoints, etc. I also don't see an easy way to determine where a specific email is set - so any changes rely on a lot of investigation to ensure nothing breaks.