From 472d3a00a314083e8fb085d414aac4e62d24eaff Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 25 May 2012 16:50:25 +0000 Subject: [PATCH] Fixed that some input fields are escaped on validation failures (#11027). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9711 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/initializers/10-patches.rb | 2 +- test/functional/queries_controller_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 4abb1a357..dc847de50 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -43,7 +43,7 @@ module ActionView end end -ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" } +ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| html_tag || ''.html_safe } require 'mail' diff --git a/test/functional/queries_controller_test.rb b/test/functional/queries_controller_test.rb index 7cd823e6f..5ffc31f8a 100644 --- a/test/functional/queries_controller_test.rb +++ b/test/functional/queries_controller_test.rb @@ -149,6 +149,7 @@ class QueriesControllerTest < ActionController::TestCase end assert_response :success assert_template 'new' + assert_select 'input[name=?]', 'query[name]' end def test_edit_global_public_query -- 2.39.5