Changeset 1660

Show
Ignore:
Timestamp:
03/02/10 13:41:27 (5 months ago)
Author:
martin
Message:

Added ullHTMLPurifier and a new validator; adapted wiki

Location:
trunk
Files:
2 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/apps/frontend/i18n/messages.de.xml

    r1186 r1660  
    6363</trans-unit> 
    6464 
     65<trans-unit id="12"> 
     66<source>Contains invalid characters.</source> 
     67<target>EnthÀlt ungÃŒltige Zeichen.</target> 
     68</trans-unit> 
     69 
    6570    </body> 
    6671  </file> 
  • trunk/plugins/ullWikiPlugin/lib/form/ullWikiForm.class.php

    r1470 r1660  
    1313    $object = parent::updateObject(); 
    1414 
    15     $cachePath = sfConfig::get('sf_cache_dir') . '/htmlpurifier'; 
    16     if (!file_exists($cachePath)) 
    17     { 
    18         mkdir($cachePath); 
    19     } 
    20      
    21     $config = HTMLPurifier_Config::createDefault(); 
    22     $config->set('Cache.SerializerPath', $cachePath); 
    23     $config->set('Attr.EnableID', true); 
    24     $config->set('Attr.AllowedFrameTargets', '_blank, _parent, _self, _top'); 
    25     $purifier = new HTMLPurifier($config); 
    26   
    27     $object->body = htmlentities($purifier->purify($object->body), ENT_QUOTES, 'UTF-8');    
     15    $object->body = htmlentities(ullHTMLPurifier::purifyForWiki($object->body), ENT_QUOTES, 'UTF-8');    
    2816    $object->setEditCounter($object->getEditCounter() + 1); 
    2917    $object->setTags($this->getValue('duplicate_tags_for_search'));