Exercise / HTMLPurifierBundle

HTML Purifier is a standards-compliant HTML filter library written in PHP.
http://htmlpurifier.org/
Other
275 stars 56 forks source link

Configuration of htmlpurifier in Symfony 3.4 #73

Closed greenkey-m closed 4 years ago

greenkey-m commented 4 years ago

I tried to remove cache_serializer_path from symfony cache folder to another (tmp), as it described in readme, but its not work. As i understood, it must be something like this (config.yml):

exercise_html_purifier:
    default_cache_serializer_path: null
    custom:
        Cache.SerializerPath: 'tmp/htmlpurifier'

and i call this service as: $this->kernel->getContainer()->get('exercise_html_purifier.custom')

In this case, folder not removed to /tmp path, but htmlpurifier restore folder in symfony cache ;-)

And, i tried another ways, like these:

exercise_html_purifier:
    default_cache_serializer_path: null
    html_profiles:
        custom:
            config:
                Cache.SerializerPath: 'tmp/htmlpurifier'

or

exercise_html_purifier:
    default_cache_serializer_path: null
    html_profiles:
        custom:
            Cache.SerializerPath: 'tmp/htmlpurifier'

And this is not work at all.

HeahDude commented 4 years ago

Hello @greenkey-m, thanks for the report. Which version are you currently using? 2.0 or 3.0-beta?

greenkey-m commented 4 years ago

I am using version 2.0.5

HeahDude commented 4 years ago

I could not reproduce the issue. When using version 2.0, be sure you're reading the 2.0 branch of the README. The correct config should be:

exercise_html_purifier:
    default:
        Cache.SerializerPath: null
    custom:
        Cache.SerializerPath: 'tmp/htmlpurifier'

I'm closing here though, don't hesitate to reopen if this does not fix your issue. Thanks