Skip to content

Commit

Permalink
Bleach task title on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
shacker committed Jan 11, 2020
1 parent 6c31d44 commit 58d7bdf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions todo/views/task_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class MergeForm(forms.Form):
if form.is_valid():
item = form.save(commit=False)
item.note = bleach.clean(form.cleaned_data["note"], strip=True)
item.title = bleach.clean(form.cleaned_data["title"], strip=True)
item.save()
messages.success(request, "The task has been edited.")
return redirect(
Expand Down

0 comments on commit 58d7bdf

Please sign in to comment.