aboutsummaryrefslogtreecommitdiffstats
path: root/library/HTMLPurifier/AttrTransform/SafeObject.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/HTMLPurifier/AttrTransform/SafeObject.php')
-rw-r--r--library/HTMLPurifier/AttrTransform/SafeObject.php16
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