From 7c1ad3c11a8bf2b8b28c52f5d6d25ae47a781cf1 Mon Sep 17 00:00:00 2001 From: nccu Date: Tue, 13 Jan 2015 10:35:42 +0800 Subject: [PATCH] fix news title html --- app/controllers/news_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index fe7e084..3809e38 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -74,7 +74,7 @@ class NewsController < ApplicationController } end { - "title" => a.title, + "title" => HTMLEntities.new.encode(a.title), "subtitle" => a.subtitle, "statuses" => statuses, "category" => a.category.title, @@ -134,7 +134,7 @@ class NewsController < ApplicationController } end { - "title" => a.title, + "title" => HTMLEntities.new.encode(a.title), "subtitle" => a.subtitle, "statuses" => statuses, "category" => a.category.title, @@ -192,7 +192,7 @@ class NewsController < ApplicationController "categories" => categories, "data" => { "categories-title" => t("news.categories"), - "title" => news.title, + "title" => HTMLEntities.new.encode(news.title), "category" => news.category.title, "category-link" => "/#{I18n.locale.to_s + page.url}/?category=#{news.category.to_param}", "unit" => news.unit.name,