From 8cdcf308bef6a2ad9ee4fcf60ae9d716f6c562e8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 24 Mar 2010 20:26:22 +0000 Subject: Escape href attribute in auto links (#5179). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3612 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 656d05f8c..180093bed 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -60,12 +60,14 @@ class ApplicationHelperTest < HelperTestCase 'sftp://foo.bar' => 'sftp://foo.bar', # two exclamation marks 'http://example.net/path!602815048C7B5C20!302.html' => 'http://example.net/path!602815048C7B5C20!302.html', + # escaping + 'http://foo"bar' => 'http://foo"bar', } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end def test_auto_mailto - assert_equal '

', + assert_equal '

', textilizable('test@foo.bar') end @@ -130,6 +132,8 @@ RAW "\"system administrator\":mailto:sysadmin@example.com?subject=redmine%20permissions" => "system administrator", # two exclamation marks '"a link":http://example.net/path!602815048C7B5C20!302.html' => 'a link', + # escaping + '"test":http://foo"bar' => 'test', } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end -- cgit v1.2.3