added ascii utf filter to messages around comments
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user