Rinser/plugins/fix_scripts.js
Martin Donnelly f0e9ac089b fixed plugins
2016-07-05 12:10:18 +01:00

14 lines
435 B
JavaScript

module.exports = function (item, itemOptions, source) {
if ((typeof itemOptions.description !== 'undefined') && (itemOptions.description !== null)) {
var match = itemOptions.description.replace(
/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
'');
match = match.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,
'');
itemOptions.description = match;
}
return itemOptions;
};