Catches missing reference to previous sanitizer

This commit is contained in:
Mouse Reeve 2022-07-04 13:24:13 -07:00
parent 62aa4bf869
commit 13376f8970

View file

@ -2,15 +2,13 @@
from django.db import transaction from django.db import transaction
from bookwyrm import models from bookwyrm import models
from bookwyrm.sanitize_html import InputHtmlParser from bookwyrm.utils import sanitizer
def create_generated_note(user, content, mention_books=None, privacy="public"): def create_generated_note(user, content, mention_books=None, privacy="public"):
"""a note created by the app about user activity""" """a note created by the app about user activity"""
# sanitize input html # sanitize input html
parser = InputHtmlParser() content = sanitizer.clean(content)
parser.feed(content)
content = parser.get_output()
with transaction.atomic(): with transaction.atomic():
# create but don't save # create but don't save