Closed danaki closed 4 years ago
You should add your custom instance of purifier, see https://github.com/Exercise/HTMLPurifierBundle#purifiers-registry
Ok, how can I replace the default then? This:
App\HtmlPurifier\DefaultHtmlPurifier:
tags:
- name: exercise.html_purifier
profile: default
doesn't work
This:
services:
App\HtmlPurifier\DefaultHtmlPurifier: '@exercise_html_purifier.default'
Also doesn't
Hello @danaki to override the default service and inject your purifier everywhere \HTMLPurifier
is type hinted, you need to define it the other way around:
services:
exercise_html_purifier.default: '@App\HtmlPurifier\DefaultHtmlPurifier'
I've updated the Readme in #68, so I'm going to close here. Feel free to reopen if it does not work as expected. Thanks!
I'm moving a project to Symfony4 from other framework where it defined like so:
Is it possible to introduce a config setting to override standard \HTMLPurifier_Config with a custom one from bundle config?