HtmlSanitize
4 min
removes any embedded html code and tags that could be used to inject malicious code into a web page however, this function does not remove tags that do simple text formatting such as bolding and italicizing text the purpose of this function is to allow the application to display formatted html without allowing malicious content syntax htmlsanitize(text) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes business rules editing rules yes business rules initialization rules yes business rules read only rules yes business rules required rules yes business rules validation rules yes client expressions yes object permissions no services yes ldap yes mobile yes quick actions (except ui quick actions) yes ui quick actions yes reports yes search/dashboard without field references yes search/dashboard with field references no parameters parameter description text the text to sanitize return value unicode text value example $(htmlsanitize("\<b>use this sample code to fix the issue\</b> \<a href='' onmouseover='alert(/executed js/)' >link\</a>")) the example above removes the script ('alert(/executed js/)' ) and results in a text field that says this \<b>use this sample code to fix the issue\</b> \<a href='' onmouseover=''>link\</a>
