From 7776b5b6659ee213c031fd1ed3f73d503af6541e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 23 Dec 2008 17:05:38 +0000 Subject: Escape textile titles and styles (#2377). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2170 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/unit/helpers') diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index b3bc8e40d..d2d1a1f19 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -76,6 +76,15 @@ class ApplicationHelperTest < HelperTestCase to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end + def test_acronyms + to_test = { + 'this is an acronym: GPL(General Public License)' => 'this is an acronym: GPL', + 'GPL(This is a double-quoted "title")' => 'GPL', + } + to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + + end + def test_attached_images to_test = { 'Inline image: !logo.gif!' => 'Inline image: This is a logo', @@ -90,6 +99,7 @@ class ApplicationHelperTest < HelperTestCase 'This is a "link":http://foo.bar' => 'This is a link', 'This is an intern "link":/foo/bar' => 'This is an intern link', '"link (Link title)":http://foo.bar' => 'link', + '"link (Link title with "double-quotes")":http://foo.bar' => 'link', "This is not a \"Link\":\n\nAnother paragraph" => "This is not a \"Link\":

\n\n\n\t

Another paragraph", # no multiline link text "This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line
\nand another on a second line\":test" -- cgit v1.2.3