Specify class for html_escape
This commit is contained in:
@ -152,7 +152,7 @@ class ExecutionEnvironmentsController < ApplicationController
|
||||
@docker_images ||= ExecutionEnvironment.pluck(:docker_image)
|
||||
@docker_images += Runner.strategy_class.available_images
|
||||
rescue Runner::Error => e
|
||||
flash.now[:warning] = html_escape e.message
|
||||
flash.now[:warning] = ERB::Util.html_escape e.message
|
||||
ensure
|
||||
@docker_images = @docker_images.sort.uniq
|
||||
end
|
||||
@ -189,7 +189,7 @@ class ExecutionEnvironmentsController < ApplicationController
|
||||
Runner.strategy_class.sync_environment(@execution_environment)
|
||||
rescue Runner::Error => e
|
||||
Rails.logger.warn { "Runner error while synchronizing execution environment with id #{@execution_environment.id}: #{e.message}" }
|
||||
redirect_to @execution_environment, alert: t('execution_environments.index.synchronize.failure', error: html_escape(e.message))
|
||||
redirect_to @execution_environment, alert: t('execution_environments.index.synchronize.failure', error: ERB::Util.html_escape(e.message))
|
||||
else
|
||||
redirect_to @execution_environment, notice: t('execution_environments.index.synchronize.success')
|
||||
end
|
||||
|
Reference in New Issue
Block a user