Unwanted <p> tags being displayed - HTML & Server Script

Ben42
Tera Contributor

Hello Guys,

I wanted to display 'Details' field value on the 'Planned Maintenance' widget. For that I have cloned the ootb 'Planned Maintenance' widget and added the html/server side code highlighted below. But, When looking at widget I am seeing some unwanted <p> </p> tags like below. How can I remove those unwanted <p> tags?

 

Custom code:

 

Ben42_0-1679401919221.png

 

Unwanted <p> </p> tags:

 

Ben42_1-1679401943909.png

 

Thanks,

Ben.

 

 

1 REPLY 1

Muhammad Khan
Mega Sage
Mega Sage

The tags are appearing because Details is an HTML field. To remove those tags, try with below statement in HTML of your widget.

 

<div ng-bind-html="c.data.details"><div/>