takahe/core
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
..
migrations Migration reset, start of docs, env vars 2022-11-18 11:28:16 -07:00
models Add admin notification for new identities 2023-01-15 14:48:17 -07:00
templatetags email templates (#328) 2022-12-30 16:03:11 -07:00
__init__.py Initial commit (users and statuses) 2022-11-05 14:17:27 -06:00
admin.py Improve djadmin filtering and search (#149) 2022-12-08 10:29:51 -07:00
apps.py Migration reset, start of docs, env vars 2022-11-18 11:28:16 -07:00
context.py Basic OpenGraph support (#267) 2022-12-26 10:39:33 -07:00
decorators.py Only cache unauthenticated page views (#117) 2022-12-05 22:23:07 -07:00
exceptions.py settings.SETUP.SENTRY_CAPTURE_MESSAGES (#133) 2022-12-06 16:54:45 -07:00
files.py Save all animation frames if they make it through 2023-01-08 14:28:25 -07:00
html.py Match sanitizing for posts to Mastodon (#422) 2023-01-15 22:32:04 -07:00
htmx.py Add pyupgrade with --py310-plus in pre-commit (#103) 2022-12-05 10:38:37 -07:00
ld.py Fix data integrity schema 2022-12-31 11:56:50 -07:00
middleware.py Install debug toolbar in debug mode 2022-12-20 15:26:39 +00:00
sentry.py [WIP] Sentry improvements (#108) 2022-12-04 18:08:23 -07:00
signatures.py Fix signature typechecking 2023-01-11 11:00:18 -07:00
snowflake.py Implement snowflake IDs for some models. 2023-01-08 18:05:29 -07:00
uploads.py Remove identity avatar fetching 2022-12-19 20:55:27 +00:00
uris.py Improve cache busting proxy URLs with file exts 2022-12-28 11:57:54 -07:00
views.py Views that return fixed content only generate the content once (#271) 2022-12-25 14:26:15 -07:00