Iframe.php 1009 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * XHTML 1.1 Iframe Module provides inline frames.
  4. *
  5. * @note This module is not considered safe unless an Iframe
  6. * whitelisting mechanism is specified. Currently, the only
  7. * such mechanism is %URL.SafeIframeRegexp
  8. */
  9. class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule
  10. {
  11. public $name = 'Iframe';
  12. public $safe = false;
  13. public function setup($config) {
  14. if ($config->get('HTML.SafeIframe')) {
  15. $this->safe = true;
  16. }
  17. $this->addElement(
  18. 'iframe', 'Inline', 'Flow', 'Common',
  19. array(
  20. 'src' => 'URI#embedded',
  21. 'width' => 'Length',
  22. 'height' => 'Length',
  23. 'name' => 'ID',
  24. 'scrolling' => 'Enum#yes,no,auto',
  25. 'frameborder' => 'Enum#0,1',
  26. 'longdesc' => 'URI',
  27. 'marginheight' => 'Pixels',
  28. 'marginwidth' => 'Pixels',
  29. )
  30. );
  31. }
  32. }
  33. // vim: et sw=4 sts=4