diff options
author | Jayaram Pai | 2014-05-22 12:25:50 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-05-22 12:25:50 +0530 |
commit | ddf041a44674870d5af145150fca832bfe473cc7 (patch) | |
tree | ca93d03aa1b15551ed56bcf40b3e370b6b5e971a /website | |
parent | ed0f82a0a28b503b3b3e5260695e2d00fcde4fa9 (diff) | |
download | FOSSEE-Forum-ddf041a44674870d5af145150fca832bfe473cc7.tar.gz FOSSEE-Forum-ddf041a44674870d5af145150fca832bfe473cc7.tar.bz2 FOSSEE-Forum-ddf041a44674870d5af145150fca832bfe473cc7.zip |
fixed unicode escape problem.
Diffstat (limited to 'website')
-rw-r--r-- | website/views.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/website/views.py b/website/views.py index 69c5a41..01f07ed 100644 --- a/website/views.py +++ b/website/views.py @@ -91,7 +91,7 @@ def question_answer(request): answer = Answer() answer.uid = request.user.id answer.question = question - answer.body = body + answer.body = body.encode('unicode_escape') answer.save() if question.uid != request.user.id: notification = Notification() @@ -137,7 +137,7 @@ def answer_comment(request): comment = AnswerComment() comment.uid = request.user.id comment.answer = answer - comment.body = body + comment.body = body.encode('unicode_escape') comment.save() # notifying the answer owner @@ -230,7 +230,7 @@ def new_question(request): question.minute_range = cleaned_data['minute_range'] question.second_range = cleaned_data['second_range'] question.title = cleaned_data['title'] - question.body = cleaned_data['body'] + question.body = cleaned_data['body'].encode('unicode_escape') question.views= 1 question.save() @@ -389,7 +389,7 @@ def ajax_question_update(request): if question: if question.uid == request.user.id or request.user.id in admins: question.title = title - question.body = body + question.body = body.encode('unicode_escape') question.save() return HttpResponse("saved") @@ -419,7 +419,7 @@ def ajax_answer_update(request): answer= get_object_or_404(Answer, pk=aid) if answer: if answer.uid == request.user.id or request.user.id in admins: - answer.body = body + answer.body = body.encode('unicode_escape') answer.save() return HttpResponse("saved") @@ -431,7 +431,7 @@ def ajax_answer_comment_update(request): comment = get_object_or_404(AnswerComment, pk=comment_id) if comment: if comment.uid == request.user.id or request.user.id in admins: - comment.body = comment_body + comment.body = comment_body.encode('unicode_escape') comment.save() return HttpResponse("saved") |