Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Certain parts of HTML gets removed as email template is saved

BMurphy
New Contributor III
New Contributor III

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:

BMurphy_0-1660911318471.png

Here is the result after editing the email template:

BMurphy_1-1660911433710.png

< gets turned into &It; and > into &gt;

 

Thanks,

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

Give space after <% and if 

rushikeshvartak_0-1660935094743.png

<% if (task?.tasktype == 37)

Alternative : Use Transport - Export to export respective email

Update it & Reimport Transport - Import 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

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:

BMurphy_1-1661171060186.png

Thanks,

BMurphy
New Contributor III
New Contributor III

Nevermind I fixed it, not too sure how but it works now.

Thanks for the help.

sahajranajee
Saviynt Employee
Saviynt Employee

@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.


Regards,
Sahaj Ranajee
Sr. Product Specialist

angela
New Contributor III
New Contributor III

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.