You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

removeScriptElement.js 423B

1234567891011121314151617181920212223
  1. 'use strict';
  2. exports.type = 'perItem';
  3. exports.active = false;
  4. exports.description = 'removes <script> elements (disabled by default)';
  5. /**
  6. * Remove <script>.
  7. *
  8. * https://www.w3.org/TR/SVG/script.html
  9. *
  10. * @param {Object} item current iteration item
  11. * @return {Boolean} if false, item will be filtered out
  12. *
  13. * @author Patrick Klingemann
  14. */
  15. exports.fn = function(item) {
  16. return !item.isElem('script');
  17. };