diff options
Diffstat (limited to 'library/HTMLPurifier/AttrTransform/SafeObject.php')
-rw-r--r-- | library/HTMLPurifier/AttrTransform/SafeObject.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/HTMLPurifier/AttrTransform/SafeObject.php b/library/HTMLPurifier/AttrTransform/SafeObject.php new file mode 100644 index 000000000..1ed74898b --- /dev/null +++ b/library/HTMLPurifier/AttrTransform/SafeObject.php @@ -0,0 +1,16 @@ +<?php + +/** + * Writes default type for all objects. Currently only supports flash. + */ +class HTMLPurifier_AttrTransform_SafeObject extends HTMLPurifier_AttrTransform +{ + public $name = "SafeObject"; + + function transform($attr, $config, $context) { + if (!isset($attr['type'])) $attr['type'] = 'application/x-shockwave-flash'; + return $attr; + } +} + +// vim: et sw=4 sts=4 |