certification
1 TopicCertification How to Use sanitization?
Hi, As part of the certification process there is a requirement to: "ensure DOM is manipulated safely. Use sanitization for user input or user data, before adding it to DOM." How have others achived this? I have implemented the code below to loop through all the data from the user and apply a sanitizeHTML function on it. I am not sure if this is enough. options.dataViews[0].table.rows = options.dataViews[0].table.rows.map(innerArray => innerArray.map(element => {if (element) { return sanitizeHtml(String(element)); } else return null }));Solved