Private
Public Access
1
0

added ascii utf filter to messages around comments

This commit is contained in:
Sander Roosendaal
2018-04-04 17:32:18 +02:00
parent 1ce5ba2a17
commit 3d9ee2aa22

View File

@@ -8564,6 +8564,11 @@ def workout_comment_view(request,id=0):
cd = form.cleaned_data
comment = cd['comment']
comment = bleach.clean(comment)
if isinstance(comment,unicode):
comment = comment.encode('utf8')
elif isinstance(comment, str):
comment = comment.decode('utf8')
notification = cd['notification']
c = WorkoutComment(workout=w,user=request.user,comment=comment,
notification=notification)