mozilla / bleach

Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes
https://bleach.readthedocs.io/en/latest/
Other
2.66k stars 250 forks source link

Correctly urlencode email address parts #659

Closed larseggert closed 2 years ago

larseggert commented 2 years ago

Fixes #658

willkg commented 2 years ago

@larseggert Can you fix up the broken tests? Thanks!

If you don't have time for that, I can get to it this month. I think it's mostly fixing "@" -> "%40" kinds of things.

larseggert commented 2 years ago

@willkg could you kick the CI tests? For some reason, running the tests locally via tox doesn't work.

willkg commented 2 years ago

You should be able to run tests locally. Can you elaborate on what doesn't work when you run tox?

larseggert commented 2 years ago

When I run tox locally, the change I make to handle_email_addresses don't seem to be picked up. Ditto when I just run pytest.

willkg commented 2 years ago

If you create a virtual environment and install everything with:

pip install -e '.[dev,css]'

that should install Bleach into the virtual environment in an editable mode which will reflect changes you're making in the src/ directory.

Does that help?

larseggert commented 2 years ago

If you create a virtual environment

How do I do that?

willkg commented 2 years ago

Python comes with a virtual environment system. It's a convenient way to install things in a sandbox that doesn't affect your system-wide Python setup. This is very convenient for development where the things you're working on might be in flux or have bugs.