Formatted html content stored as string in stagging table while importing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 08:17 PM
Formatted html content stored as string in stagging table while importing even though the column is HTML type.
And, noticed one thing that in list view it is showing the html tags and all, but in form, it is showing as string value.
My requirement is something similar to https://www.servicenow.com/community/grc-forum/importing-formatted-data-into-html-field-from-excel-i...
but the proposed solution( I have achieved it with GlideStringUtil.newLinesToBreaks(sourcevalue) for formatting.) in that post is not helping me, because it is replacing only new line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 08:44 PM
Hi Rajesh,
ServiceNow has HTML sanitization mechanisms to prevent users from injecting malicious HTML code. In some cases like in staging fields, even if it is marked as HTML, the display is as plain text to protect against XSS (Cross-Site Scripting) vulnerabilities.
Talking about Transforming to a Target table, you can achieve the goal in target table without difficulty. Just map as usual in Transform Map.
Also, ensure you did not edit the Type of field once its created. If not then you may create this fied from scratch.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 09:08 PM
Hi Akash
"Talking about Transforming to a Target table, you can achieve the goal in target table without difficulty. Just map as usual in Transform Map."
Could you please elaborate on this? Actually currently I am using as it is mapping only. In actual table also it is same behavior as stagging table(showing as string even though the type is HTML). That's why thought of correcting the format in stagging table itself.