Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sanitize html in JavaScript

/**
 * @param {string} text
 * @return {string}
 */
function sanitizeHTML(text) {
  return $('<div>').text(text).html();
}
COPY
Source by remarkablemark.org #
 
PREVIOUS NEXT
Tagged: #sanitize #html #JavaScript
ADD COMMENT
Topic
Name
5+6 =