Ticket #587: add_attribut.diff

File add_attribut.diff, 1.2 kB (added by Lipki, 8 months ago)
  • function.image.php

    old new  
    6767    // Name of the file cache 
    6868    $chaine = $src; 
    6969    foreach($params as $key => $value) 
    70         if( !in_array($key, array('alt', 'class', 'id', 'style'))) 
     70        if( !in_array($key, array('alt', 'class', 'id', 'style', 'longdesc', 'name', 'ismap', 'usemap', 'title', 'dir', 'lang', 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout', 'onkeypress', 'onkeydown', 'onkeyup'))) 
    7171            $chaine .= $key.$value; 
    7272    $cachename = md5($chaine).'.'.$ext; 
    7373     
     
    8888    } 
    8989     
    9090    // Attributes 
    91     $att = array('alt'=>'', 'id'=>'', 'class'=>''); 
     91    $att = array('alt'=>'', 'id'=>'', 'class'=>'', 'style'=>'', 'longdesc'=>'', 'name'=>'', 'ismap'=>'', 'usemap'=>'', 'title'=>'', 'dir'=>'', 'lang'=>'', 'onclick'=>'', 'ondblclick'=>'', 'onmousedown'=>'', 'onmouseup'=>'', 'onmouseover'=>'', 'onmousemove'=>'', 'onmouseout'=>'', 'onkeypress'=>'', 'onkeydown'=>'', 'onkeyup'=>''); 
    9292    $att = array_intersect_key($params, $att); 
    9393     
    9494    // If the image does not undergo transformation 
Download in other formats: Original Format