diff options
Diffstat (limited to 'lib/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php')
-rw-r--r-- | lib/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php b/lib/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeObject.php new file mode 100644 index 000000000..1ed74898b --- /dev/null +++ b/lib/htmlpurifier/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 |