StripHtml
4 min
returns the text value of the input without html markup use the optional keeplinebreaks parameter to specify whether to keep line breaks in syntax striphtml(htmlstring, keeplinebreaks) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd parameter 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 export to excel no parameters parameter description htmlstring the html text to strip keeplinebreaks (optional) a boolean value that specifies if the line breaks in the html text to strip should be converted to a new line before the conversion if this value is true, the function takes all the \<br> tags and replaces them with new lines before it does the stripping to prevent all the lines from running together return value text value example example of striphtml function with htmlstring only $(striphtml ("\<b>use this sample code to fix the issue\</b>\<br> \<a href='' onmouseover='alert(/executed js/)' >link\</a>")) the example above removes the html tags and returns the following use this sample code to fix the issue link example of striphtml function with keeplinebreaks as true $(striphtml ("\<b>use this sample code to fix the issue\</b>\<br> \<a href='' onmouseover='alert(/executed js/)' >link\</a>", true)) the example above removes the html tags and returns the following use this sample code to fix the issue link
