what does GlideStringUtil.escapeHTML(); does?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 06:00 AM
Some characters are not valid in Jelly HTML Script part . For eg"<" (you can try using this, and it will return and error). What escapeHTML does is, it converts invalid XML characters like "<" ,">","&" to its literal equivalent.
For eg:
var x = "<b>&TEST</b>";
gs.log(GlideStringUtil.escapeHTML(x));
Output:
<b>&TEST</b>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 06:04 AM
It removes the HTML tags if any field contains them
example-
if short_description contains- <b>test</b> then the function below will return only test.
GlideStringUtil.escapeHTML(gr.short_description);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 06:47 AM
Correct