"User Password Changed" EmailTemplate breaks if any html is added

The “User Password Changed” template will list all the app passwords changed that are in the sync group, however if we try to add any html through the UI editor it breaks the appList from showing. Example code block
<p style="margin: 0px; color: #222222; font-family: 'arial' , 'helvetica' , sans-serif; font-size: small;">&nbsp;</p>
<div style="color: #222222; font-family: 'arial' , 'helvetica' , sans-serif; font-size: small;">
<p style="margin: 0px; background: #004e88;"><strong><span style="font-size: 14pt; font-family: 'tahoma' , sans-serif; color: white;">&nbsp;Attention: Your password has been updated.</span></strong></p>
</div>
<p>Dear ${user.name},</p>
#if (${sourceCount})#if (${sourceCount} > 0)#if (${sourceCount} > 1)#if (${sourceFailedCount} > 0)
<p>Your password was changed for the following sources which share a password:</p>
#else

This had previously worked but wondering if an update broke it and if there is a workaround.

If you are updating it in the UI, I wonder if you would have different results doing it through the API. create-notification-template | SailPoint Developer Community

@ryan_toornburg this code snipped has redundant #if blocks. all #if blocks must be closed with a corresponding #end block. is this complete code? can you share the email template file?

@ryan_toornburg -

I suspect, you might have missed the corresponding #end for every #if you mentioned in the template.

I just rendered below template and it worked perfectly fine -

<p style="margin:0;background:#004e88;">
  <strong><span style="font-size:14pt;font-family:tahoma,sans-serif;color:white;">
    &nbsp;Attention: Your password has been updated.
  </span></strong>
</p>

<p>Dear ${user.name},</p>

#if ($sourceCount && $sourceCount > 0)
  #if ($sourceCount > 1)
    <p>Your password was changed for the following sources which share a password:</p>
  #else
    <p>Your password was changed for the following source which shares a password:</p>
  #end

  <p>${sourceList}</p>
#end

#if ($appCount && $appCount > 0)
  <p>Your password was changed for the following apps which share a password:</p>
  <p>${appList}</p>
#end

Test Email -

Hope this helps!

The ootb template attempts to split the list. However it is not a list, it is a csv string so changing it to this works.

#set($failedItems = $appFailedList.split(“,”))


#foreach($item in $failedItems)
$item.trim()

#end