HTML code is visible on the notification while using description field in HR case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2025 05:47 AM
HTML code is visible on the notification while using description filed on the HR case.
If I use rich_description it's working as expected, but this is working earlier while using description field
Can anyone suggest the issue over here.
Thanks in Advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2025 05:55 AM
@Vijay Anusuri The description field is a plain text field (String), not an HTML field. When you put HTML-like content inside it, it’s treated literally in the notification.
It might be because of ServiceNow instance upgrade changed how rendering is handled, especially around safe HTML sanitization and field types.
Recommended to use rich_description
OR
Convert description to HTML safely with below script in email script:
var desc = current.description + '';
return desc.replace(/\n/g, '<br>');
if my response helps you, then please hit helpful and accept as a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2025 05:55 AM
description field is of what type? May be it's string and hence showing HTML code in notification
It's working for rich_description because it's HTML type.
Since you said it was working previously.
Did you upgrade recently?
Did the field type change during the upgrade?
share some more details and screenshots.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader