[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/htmlpurifier/library/HTMLPurifier/AttrTransform/ -> Name.php (source)

   1  <?php
   2  
   3  /**
   4   * Pre-transform that changes deprecated name attribute to ID if necessary
   5   */
   6  class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform
   7  {
   8  
   9      public function transform($attr, $config, $context) {
  10          if (!isset($attr['name'])) return $attr;
  11          $id = $this->confiscateAttr($attr, 'name');
  12          if ( isset($attr['id']))   return $attr;
  13          $attr['id'] = $id;
  14          return $attr;
  15      }
  16  
  17  }
  18  
  19  // vim: et sw=4 sts=4


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1