xss.js 256 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 export default { replaceIllegal: (str) => { return str.replace(/<[^<>]+>/g, ''); }, replaceScript: (str) => { return str.replace(/<\/?script>/g, '').replace(/javascript:/g, '').replace(/src=.*?\/\/.*?\.js('|")?/g, ''); } };