HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_AttrTransform
00007 {
00008     public function transform($attr, $config, $context) {
00009         if (!isset($attr['type'])) {
00010             $attr['type'] = 'text/javascript';
00011         }
00012         return $attr;
00013     }
00014 }
00015 
00016 // vim: et sw=4 sts=4