File indexing completed on 2024-12-22 05:36:19
0001 <?php 0002 0003 /** 0004 * Implements required attribute stipulation for <script> 0005 */ 0006 class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_AttrTransform 0007 { 0008 /** 0009 * @param array $attr 0010 * @param HTMLPurifier_Config $config 0011 * @param HTMLPurifier_Context $context 0012 * @return array 0013 */ 0014 public function transform($attr, $config, $context) 0015 { 0016 if (!isset($attr['type'])) { 0017 $attr['type'] = 'text/javascript'; 0018 } 0019 return $attr; 0020 } 0021 } 0022 0023 // vim: et sw=4 sts=4