From 4c435dba1a4e642f2276c2d750e32e8bbef4efb8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 5 Dec 2019 12:07:15 +0000 Subject: Merged r19333 from trunk to 3.3-stable (#25742) Filter all possibly class values on code tags in Textile. Contributed by Holger Just from Planio. git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@19337 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/unit') diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index 8920a6ae9..59273d409 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -536,9 +536,17 @@ STR def test_should_not_allow_arbitrary_class_attribute_on_offtags %w(code pre kbd).each do |tag| assert_html_output({"<#{tag} class=\"foo\">test" => "<#{tag}>test"}, false) + assert_html_output({"<#{tag} class='foo'>test" => "<#{tag}>test"}, false) + assert_html_output({"<#{tag} class=\"ruby foo\">test" => "<#{tag}>test"}, false) + assert_html_output({"<#{tag} class='ruby foo'>test" => "<#{tag}>test"}, false) + assert_html_output({"<#{tag} class=\"ruby \"foo\" bar\">test" => "<#{tag}>test"}, false) end assert_html_output({"test" => "test"}, false) + assert_html_output({"test" => "test"}, false) + assert_html_output({"test" => "test"}, false) + assert_html_output({"test" => "test"}, false) + assert_html_output({"test" => "test"}, false) end def test_should_allow_valid_language_class_attribute_on_code_tags -- cgit v1.2.3