Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

52 rindas
1.1KB

  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. /**
  12. * @type string
  13. */
  14. public $name = 'Iframe';
  15. /**
  16. * @type bool
  17. */
  18. public $safe = false;
  19. /**
  20. * @param HTMLPurifier_Config $config
  21. */
  22. public function setup($config)
  23. {
  24. if ($config->get('HTML.SafeIframe')) {
  25. $this->safe = true;
  26. }
  27. $this->addElement(
  28. 'iframe',
  29. 'Inline',
  30. 'Flow',
  31. 'Common',
  32. array(
  33. 'src' => 'URI#embedded',
  34. 'width' => 'Length',
  35. 'height' => 'Length',
  36. 'name' => 'ID',
  37. 'scrolling' => 'Enum#yes,no,auto',
  38. 'frameborder' => 'Enum#0,1',
  39. 'longdesc' => 'URI',
  40. 'marginheight' => 'Pixels',
  41. 'marginwidth' => 'Pixels',
  42. )
  43. );
  44. }
  45. }
  46. // vim: et sw=4 sts=4