From 97c8b75edb834ebce6a715baed703a31b4b4fdd5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 27 Mar 2020 11:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/discusses/reply.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4ecc6d4c4..beb6c46be 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -12,7 +12,7 @@ module ApplicationHelper # xss共计问题 def content_safe content - return nil if content.nil? + return nil if content.present? tags = %w( a abbr b bdo blockquote br caption cite code col colgroup dd del dfn dl dt em figcaption figure h1 h2 h3 h4 h5 h6 hgroup i img ins kbd li mark diff --git a/app/views/discusses/reply.json.jbuilder b/app/views/discusses/reply.json.jbuilder index 81a22ea17..0f679cdbb 100644 --- a/app/views/discusses/reply.json.jbuilder +++ b/app/views/discusses/reply.json.jbuilder @@ -6,5 +6,5 @@ json.discuss do json.shixun_id @discuss.dis_id json.hidden @discuss.hidden json.reward @discuss.reward - json.praise_count discuss.praises_count + json.praise_count @discuss.praises_count end