How to remove HTML tags from Description field using "Client Script".

Swaroop10
Giga Contributor

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.

15 REPLIES 15

jaheerhattiwale
Mega Sage

@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