SafeObject.php 389 B

12345678910111213141516
  1. <?php
  2. /**
  3. * Writes default type for all objects. Currently only supports flash.
  4. */
  5. class HTMLPurifier_AttrTransform_SafeObject extends HTMLPurifier_AttrTransform
  6. {
  7. public $name = "SafeObject";
  8. function transform($attr, $config, $context) {
  9. if (!isset($attr['type'])) $attr['type'] = 'application/x-shockwave-flash';
  10. return $attr;
  11. }
  12. }
  13. // vim: et sw=4 sts=4