From ff3aac49d1282ee0037bd938b62561d3a531a496 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 23 Oct 2019 16:17:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/discusses/_discuss.json.jbuilder | 2 +- app/views/messages/_content.json.jbuilder | 2 +- app/views/messages/_message_detail.json.jbuilder | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/discusses/_discuss.json.jbuilder b/app/views/discusses/_discuss.json.jbuilder index 400798150..5244414f9 100644 --- a/app/views/discusses/_discuss.json.jbuilder +++ b/app/views/discusses/_discuss.json.jbuilder @@ -2,7 +2,7 @@ json.author do json.partial! 'users/user', user: discuss.user end json.id discuss.id -json.content discuss.content +json.content content_safe(discuss.content) json.time time_from_now(discuss.created_at) json.position discuss.position json.shixun_id discuss.dis_id diff --git a/app/views/messages/_content.json.jbuilder b/app/views/messages/_content.json.jbuilder index 5e1d9088b..760f1670d 100644 --- a/app/views/messages/_content.json.jbuilder +++ b/app/views/messages/_content.json.jbuilder @@ -1 +1 @@ -json.content content \ No newline at end of file +json.content content_safe(content) \ No newline at end of file diff --git a/app/views/messages/_message_detail.json.jbuilder b/app/views/messages/_message_detail.json.jbuilder index 38532429f..35237f732 100644 --- a/app/views/messages/_message_detail.json.jbuilder +++ b/app/views/messages/_message_detail.json.jbuilder @@ -1,6 +1,6 @@ json.partial! "messages/message_simple", message: message json.partial! "commons/like", message: message -json.content message.message_detail.try(:content) +json.content content_safe(message.message_detail.try(:content)) json.author do json.partial! "users/user_simple", user: message.author end \ No newline at end of file