Skip to content

formapro-forks/HTMLPurifierBundle

 
 

Repository files navigation

Installation

  1. Add this bundle and the HTMLPurifier to your project as Git submodules:

     $ git submodule add git://github.com/Exercise/HTMLPurifierBundle.git vendor/bundles/Exercise/HTMLPurifierBundle
     $ git submodule add git://github.com/ezyang/htmlpurifier.git vendor/htmlpurifier
    
  2. Add the HTMLPurifier prefix to the src/autoload.php file:

    $loader->registerPrefixes(array( // ... 'HTMLPurifier' => DIR.'/vendor/htmlpurifier/library', // ... ));

  3. Add this bundle to your application's kernel:

     // application/ApplicationKernel.php
     public function registerBundles()
     {
         return array(
             // ...
             new Exercise\HTMLPurifierBundle\ExerciseHTMLPurifierBundle(),
             // ...
         );
     }
    

Cache.SerializerPath

When using HTMLPurifier caching HTMLPurifier complains when the dir isnt availible therefor this bundle includes a CacheWarmer that will create a %kernel.cache_dir%/htmlpurifier directory to prevent this. But this require the config for caching be set as follows.

exercise_html_purifier:
    your_config_name:
        Cache.SerializerPath: %kernel.cache_dir%/htmlpurifier

About

HTML Purifier is a standards-compliant HTML filter library written in PHP.

Resources

Stars

1 star

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%