Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
72:custom_report_tipsandtricks_remove_tags [2019/02/07 13:47] – created ext-bkkr72:custom_report_tipsandtricks_remove_tags [2019/03/06 20:38] ext-bkkr
Line 1: Line 1:
 ====== Remove HTML Tags from Stages Element Descriptions within the Data Set Script ====== ====== Remove HTML Tags from Stages Element Descriptions within the Data Set Script ======
 +
 +The following function can be used for Data Set scripts and will remove all HTML tags.
 +
 +//Instructions//
 +
 +1. Add the following javascript function to your Data Set script.
 +
 +<code>
 +function stripHTML(str){
 + var s=new String(str);
 + var re= /<\S[^><]*>/g
 + return s.replace(re, "")
 +}
 +</code>
 +
 +2. Use the function stripHTML(description); in your Data Set script to clean up the description.