From 5386bcfb9725546b0f4655eceed731e7ff65aa6b Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 29 Apr 2020 18:09:01 +0800 Subject: [PATCH] fix error when locale not setting and prevent xss attack --- app/controllers/personal_projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_projects_controller.rb b/app/controllers/personal_projects_controller.rb index 972a3f4..71b6688 100644 --- a/app/controllers/personal_projects_controller.rb +++ b/app/controllers/personal_projects_controller.rb @@ -93,7 +93,7 @@ class PersonalProjectsController < ApplicationController 'projects' => project_list, 'headers' => headers, 'extras' => { 'widget-title' => t('module_name.personal_project'), - 'url' => '/' + params[:locale] + params[:url], + 'url' => '/' + I18n.locale.to_s + params[:url], 'select_text' => select_text, 'search_text' => search_text, 'search_value' => params[:keywords].to_s.gsub(/\"/,''),