Closed lucasgranberg closed 9 years ago
Looks like it's configuration resposobility
Did not find a way to do it via bundle config but I did however manage to add a configurator for the service like this: http://symfony.com/doc/current/components/dependency_injection/configurators.html
Hi @lucasgranberg
I also need to add an element to the definition. How did you achieve this in the end? I took a look at the configurators, but this seems to only work if you define the service. However, this bundle is defining the services dynamically in the ExerciseHTMLPurifierExtension
.
I really need to be able to add a custom element, but cannot work out how to acheive it. Any help would be much appreciated.
I don't remember and I don't have access to the code anymore. The link is dead. I think this is the right one: http://symfony.com/doc/current/service_container/configurators.html
However I think you can add elements directly trough symfony config.
exercise_html_purifier:
onlylinksandparagraphs:
HTML.Allowed: 'a[href],p'
http://htmlpurifier.org/live/configdoc/plain.html#HTML.Allowed
Thank for your reply @lucasgranberg
I am trying to add an element that does not exist (e.g HTML.Allowed
apparently only allows you to add already defined elements. Also it seems to override all allowed elements.
Any ideas? I would be very grateful 😄
Hello, did you manage to fix the issue? Just ran into the sams issue too.
I would like to add support for an element. I can do it like this in the controller:
How can I do it systemwide?