Code Monkey home page Code Monkey logo

Comments (6)

spolischook avatar spolischook commented on June 3, 2024

Looks like it's configuration resposobility

from htmlpurifierbundle.

lucasgranberg avatar lucasgranberg commented on June 3, 2024

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.

senaria avatar senaria commented on June 3, 2024

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.

lucasgranberg avatar lucasgranberg commented on June 3, 2024

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.

senaria avatar senaria commented on June 3, 2024

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.

zxzzxxzx avatar zxzzxxzx commented on June 3, 2024

Hello, did you manage to fix the issue? Just ran into the sams issue too.

from htmlpurifierbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.