fix error when locale not setting and prevent xss attack

This commit is contained in:
chiu 2020-04-29 18:07:09 +08:00
parent 77cfa55859
commit b84067e061
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class PersonalBooksController < ApplicationController
{ {
'book_list' => book_list, 'book_list' => book_list,
'extras' => { 'widget-title' => t('module_name.book'), 'extras' => { 'widget-title' => t('module_name.book'),
'url' => '/' + params[:locale] + params[:url], 'url' => '/' + I18n.locale.to_s + params[:url],
'select_text' => select_text, 'select_text' => select_text,
'search_text' => search_text, 'search_text' => search_text,
'search_value' => params[:keywords].to_s.gsub(/\"/,''), 'search_value' => params[:keywords].to_s.gsub(/\"/,''),