Answers for "sanitizer content nodejs"

1

sanitizer content nodejs

//first install package: npm install sanitize-html --save
var sanitizeHtml = require('sanitize-html');
 
var dirty = 'This is test <a style="opacity: 0.1" href="javascript:void(0)">Link</a>';
var clean = sanitizeHtml(dirty);
console.log(clean);
//result: This is test <a>Link</a>
Posted by: Guest on May-18-2020

Code answers related to "sanitizer content nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language