diff options
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/test_case.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 9e8e6f43d5..112923adf9 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -155,7 +155,7 @@ module ActionView # # Need to experiment if this priority is the best one: rendered => output_buffer def response_from_page - HTML::Document.new(@rendered.blank? ? @output_buffer : @rendered).root + Loofah.document(@rendered.blank? ? @output_buffer : @rendered).root end def say_no_to_protect_against_forgery! diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 18c739674a..d5976905c5 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -632,6 +632,6 @@ class FormTagHelperTest < ActionView::TestCase private def root_elem(rendered_content) - HTML::Document.new(rendered_content).root.children[0] + Loofah.fragment(rendered_content).children.first # extract from nodeset end end |