function sanitizeHtml(inputText) {
  let convertDiv = document.createElement('div');
  convertDiv.textContent = inputText;
  return convertDiv.innerHTML;
}
/**
 * Creates an innerHtml element and then reads its text to remove special
 * characters from the input
 * @param {string} inputText The input to remove special characters from to
 *     prevent scripting attacks
 */
Creates an innerHtml element and then reads its text to remove special
characters from the input
@param {string} inputText The input to remove special characters from to
prevent scripting attacks
Creates an innerHtml element and then reads its text to remove special characters from the input @param { string } inputText The input to remove special characters from to prevent scripting attacks
function sanitizeHtml(inputText) {
  let convertDiv = document.createElement('div');
  convertDiv.textContent = inputText;
  return convertDiv.innerHTML;
}
function sanitizeHtml ( inputText ) { let convertDiv = document . createElement ( 'div' ) ; convertDiv . textContent = inputText ; return convertDiv . innerHTML ; }
Creates an innerHtml element and then reads its text to remove special
 characters from the input
 @param {string} inputText The input to remove special characters from to
     prevent scripting attacks
Creates an innerHtml element and then reads its text to remove special characters from the input @param { string } inputText The input to remove special characters from to prevent scripting attacks