Description field value displaying with HTML code in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2018 12:58 PM
Incident description field displaying with HTML tags in Portal page.
Code:
fields = $sp.getFields(gr, 'number,state,priority,sys_created_on,u_description');
Tried getDisplayValue() but no luck. Please find the image.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2018 01:06 PM
kindly refer the thread below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2018 01:16 PM
I tried that but didn't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2018 04:54 PM
You can try:
<span ng-bind-html="field.short_description.display_value"></span>
Assuming that field.short_description.display_value is where your value "<p>this is test</p> is stored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2018 07:47 AM
That didn't work either. Description field is HTML field.
Code:
This is how I am getting all the fields to display
fields = $sp.getFields(gr, 'number,state,priority,sys_created_on,u_description');