Comments (6)
Looks like it's configuration resposobility
from htmlpurifierbundle.
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
from htmlpurifierbundle.
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.
from htmlpurifierbundle.
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
from htmlpurifierbundle.
Thank for your reply @lucasgranberg
I am trying to add an element that does not exist (e.g My Content).
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
from htmlpurifierbundle.
Hello, did you manage to fix the issue? Just ran into the sams issue too.
from htmlpurifierbundle.
Related Issues (20)
- Cache directory is not being created by the bundle, v2.0 HOT 6
- The option "purify_html_profile" with value null is expected to be of type "string", but is of type "NULL". HOT 4
- The purifying listener does not properly trim the field if there are only whitespaces. HOT 4
- Deprecation Warning with Symfony/Config 4.2
- Custom config class HOT 4
- FormType: Deprecation with Symfony 4.2 HOT 2
- Scalar check instead is_string HOT 2
- Improved Form Listener HOT 2
- Configuration of htmlpurifier in Symfony 3.4 HOT 3
- Please let's have null-safe version of Twig extension HOT 1
- Missing configuration for target attribute in documentation HOT 2
- Does wildcard applies to items in list or applies to all possible items with those attributs? HOT 1
- Compatibility with composer 2.x HOT 1
- Please can you help me explain what the cache is for? HOT 2
- The option "purify_html" does not exist HOT 1
- Add support for Symfony 6 HOT 7
- Symfony deprecations HOT 2
- Combining "rel=" properties with URI.Munge HOT 2
- Cache permission issue since 4.1
- Base directory does not exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlpurifierbundle.