mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-14 17:28:40 +00:00
12b811d749
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
17 lines
389 B
PHP
17 lines
389 B
PHP
<?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
|