14 lines
435 B
JavaScript
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;
|
|
|
|
};
|