Code Monkey home page Code Monkey logo

Comments (3)

originell avatar originell commented on August 15, 2024

Well OK after rereading #56 a bit, I think this is very very similar to what you mean with callbacks ;-)

from bleach.

jsocol avatar jsocol commented on August 15, 2024

#56 is specifically about linkify. I'm a little more cavalier with linkify because it's not quite so security-critical as clean.

The current BleachSanitizerMixin and sanitize_token is based very closely on html5lib's HTMLSanitizerMixin. I'm not closed to the idea of changing it completely, but I'm very hesitant, because it's so, so critical, and I like the idea of keeping it close to the known-good algorithm where possible.

from bleach.

willkg avatar willkg commented on August 15, 2024

In html5lib >= 0.99999999, sanitizing happens as a filter after tokenizing and you can easily add additional filters. With the rewrite for Bleach 2.0, you can trivially use the BleachSanitizerFilter with other html5lib filters (and ones you write yourself) for a cleaning pipeline.

After I finish the rewrite, I'll verify that's true and add an item to the docs about it.

from bleach.

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.