- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 05:19 AM
Need to send the catalog item description from sctask table,that is being sent as below but we need to send without HTML tags i.e plain text
"cat_item.description": "<p>Review has been configured.</p>",
Need to send above as
"cat_item.description": "Review has been configured.",
few other it is going as below can we modify it text only
"cat_item.description": "<p>Request account access for a system user. <a title=\"Click here\" href=\"https://pages.servicenow.com/download/attachments/280699946/vcb.xlsm\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Click here</a><span style=\"background-color: rgb(var(--sn-tinymce_content-background,var(--now-form-field--background-color,var(--now-color_background--primary,var(--now-color--neutral-0,255,255,255))))); color: rgb(var(--sn-tinymce_content-text,var(--now-form-field--color,var(--now-color_text--primary,var(--now-color--neutral-18,22,27,28)))));\"> to download the template.</span></p>",
as
"cat_item.description": "Request account access for a user. to download the template.",
Do we have any OOTB method to convert this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 05:43 AM
Hi @Mudugal Akhil ,
You can refer the below article to add hyperlink in description,
if you want to remove p tag then you can refer the below article,
write after insert BR with reference of below article,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 12:11 AM
Can you try like this
var st = "<p>Request account access for a system user. <a title=\"Click here\" href=\"https://pages.servicenow.com/download/attachments/280699946/vcb.xlsm\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Click here</a><span style=\"background-color: rgb(var(--sn-tinymce_content-background,var(--now-form-field--background-color,var(--now-color_background--primary,var(--now-color--neutral-0,255,255,255))))); color: rgb(var(--sn-tinymce_content-text,var(--now-form-field--color,var(--now-color_text--primary,var(--now-color--neutral-18,22,27,28)))));\"> to download the template.</span></p>";
gs.print(st.replace(/<[^>]*>?/gm, ''));
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 12:16 AM - edited 02-28-2024 01:42 AM
@Narsing1 Thanks for the reply got the solution above.