SafeEmbed.php 571 B

1234567891011121314151617181920
  1. <?php
  2. class HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTransform
  3. {
  4. public $name = "SafeEmbed";
  5. public function transform($attr, $config, $context) {
  6. $attr['allowscriptaccess'] = 'never';
  7. $attr['allownetworking'] = 'internal';
  8. $attr['type'] = 'application/x-shockwave-flash';
  9. if (!$config->get('HTML.FlashAllowFullScreen') || !$attr['allowfullscreen'] == 'true') {
  10. unset($attr['allowfullscreen']); // if omitted, assume to be 'false'
  11. }
  12. return $attr;
  13. }
  14. }
  15. // vim: et sw=4 sts=4