HTML Tags

lwatts
Kilo Contributor

On the HR Portal we have a field (Description) which was originally a multi line text type field.   I changed this field to an HTML type field so portal users could take advantage of the text editor when submitting cases.   Problem is when users submit a case via portal and the case is opened in Servicenow by support HTML tags are included in the description field.

Is there a way to keep these tags from displaying?   Any assistance would be greatly appreciated.

Thanks,

Lorenzo

16 REPLIES 16

Community Alums
Not applicable

Not sure if there is an easier way, but you would need to strip out the HTML tags before you submit the record; you can do this in javascript with regular expressions or 'replace'.  



Is this a record producer? Can you paste a screenshot of the description field after submission?



Tim


Below are screenshots of the form and a submitted case.






sachin_namjoshi
Kilo Patron
Kilo Patron

Hi,



Please follow below code which removes HTML tags from description.



Disable HTML Tags in Descriptions - ServiceNow Wiki



Regards,


Sachin


Hi Sachin,



I saw this code earlier while searching for solutions but wasn't sure where and how I need to enter. Would I use a client script, BR, etc.



Thanks,