takahe/tests
Corry Haines cfe18932b8
Match sanitizing for posts to Mastodon (#422)
Creates filter for REWRITTEN_TAGS that converts them to `p` rather than ripping them out entirely, and formats `ul` as break-separated list

Both changes align sanitization to Mastodon's "strict" sanitizer at https://github.com/mastodon/mastodon/blob/main/lib/sanitize_ext/sanitize_config.rb#L73

I don't love the complexity of the Filter, but Bleach doesn't give us great options to work with. The code operates within an iterator without the useful "sibling" methods that Ruby's equivalent has. Also, Bleach runs filters _after_ sanitizing (unlike Ruby's which runs before) so we have to pass all the elements through the sanitizer, then rewrite them after the fact.
2023-01-15 22:32:04 -07:00
..
activities Fix old post tests 2023-01-15 21:11:08 -07:00
api Add account search endpoint 2022-12-21 21:54:49 +00:00
core Match sanitizing for posts to Mastodon (#422) 2023-01-15 22:32:04 -07:00
users Fix tests and most of pagination 2023-01-08 23:06:33 -07:00
conftest.py Add Domain.state with nodeinfo fetching (#347) 2023-01-04 16:40:16 -07:00