xss.js 256 Bytes
export default {
    replaceIllegal: (str) => {
        return str.replace(/<[^<>]+>/g, '');
    },
    replaceScript: (str) => {
        return str.replace(/<\/?script>/g, '').replace(/javascript:/g, '').replace(/src=.*?\/\/.*?\.js('|")?/g, '');
    }
};