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.

63 lines
1.5KB

  1. <?php
  2. /**
  3. * XHTML 1.1 Object Module, defines elements for generic object inclusion
  4. * @warning Users will commonly use <embed> to cater to legacy browsers: this
  5. * module does not allow this sort of behavior
  6. */
  7. class HTMLPurifier_HTMLModule_Object extends HTMLPurifier_HTMLModule
  8. {
  9. /**
  10. * @type string
  11. */
  12. public $name = 'Object';
  13. /**
  14. * @type bool
  15. */
  16. public $safe = false;
  17. /**
  18. * @param HTMLPurifier_Config $config
  19. */
  20. public function setup($config)
  21. {
  22. $this->addElement(
  23. 'object',
  24. 'Inline',
  25. 'Optional: #PCDATA | Flow | param',
  26. 'Common',
  27. array(
  28. 'archive' => 'URI',
  29. 'classid' => 'URI',
  30. 'codebase' => 'URI',
  31. 'codetype' => 'Text',
  32. 'data' => 'URI',
  33. 'declare' => 'Bool#declare',
  34. 'height' => 'Length',
  35. 'name' => 'CDATA',
  36. 'standby' => 'Text',
  37. 'tabindex' => 'Number',
  38. 'type' => 'ContentType',
  39. 'width' => 'Length'
  40. )
  41. );
  42. $this->addElement(
  43. 'param',
  44. false,
  45. 'Empty',
  46. null,
  47. array(
  48. 'id' => 'ID',
  49. 'name*' => 'Text',
  50. 'type' => 'Text',
  51. 'value' => 'Text',
  52. 'valuetype' => 'Enum#data,ref,object'
  53. )
  54. );
  55. }
  56. }
  57. // vim: et sw=4 sts=4