options/editor/index.js
function sanitize(html) {
	const parts = (html ? html +'' : '').split(rTag);
	return parts.map((s, i) => i % 2 ? s : s.replace(rEsc, c => oEsc[c])).join('');
}
function sanitize(html) {
	const parts = (html ? html +'' : '').split(rTag);
	return parts.map((s, i) => i % 2 ? s : s.replace(rEsc, c => oEsc[c])).join('');
}
function sanitize ( html ) { const parts = ( html ? html + '' : '' ) . split ( rTag ) ; return parts . map ( ( s , i ) => i % 2 ? s : s . replace ( rEsc , c => oEsc [ c ] ) ) . join ( '' ) ; }
Sanitizes untrusted HTML by escaping everything that is not recognized as a whitelisted tag or entity.
@param    {string}  html  Untrusted HTML input.
@return   {string}        Sanitized HTML that won't contain any tags but those whitelisted by `rTag` below.
@author   Niklas Gollenstede
@license  MIT
Sanitizes untrusted HTML by escaping everything that is not recognized as a whitelisted tag or entity .