File indexing completed on 2024-12-22 05:36:19
0001 <?php 0002 0003 /** 0004 * Sets height/width defaults for <textarea> 0005 */ 0006 class HTMLPurifier_AttrTransform_Textarea 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 // Calculated from Firefox 0017 if (!isset($attr['cols'])) { 0018 $attr['cols'] = '22'; 0019 } 0020 if (!isset($attr['rows'])) { 0021 $attr['rows'] = '3'; 0022 } 0023 return $attr; 0024 } 0025 } 0026 0027 // vim: et sw=4 sts=4