How to remove HTML tags from Description field using "Client Script".
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020 11:59 PM
Hello,
I am trying to remove HTML Tags from Description field using Client Script. I can able to do with Business Rule, but as per my requirement i want to do it only with "Client Script".
Can anyone suggest me how to remove HTML Tags from Description field using Client Script.
Thanks in advance.
Labels:
- Labels:
-
Scripting and Coding
15 REPLIES 15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 07:23 PM
@Swaroop10 Please use below script:
var str = "<HTML STRING HERE>";
str = str.replace(/<[^>]*>/g, '');
Please mark as correct answer if this solves your issue.
Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023
ServiceNow Community Rising Star, Class of 2023