aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-09-13 18:48:34 +0000
committerJamis Buck <jamis@37signals.com>2005-09-13 18:48:34 +0000
commitb97f4e459707694bd98babb7a8890f08016d5ebf (patch)
tree286d90c2f694a9e4b21dd5e0c5b06a08b92d6c90 /actionpack/test
parent0f8a3a31a7a673837e414d363aa166dfc66809a9 (diff)
downloadrails-b97f4e459707694bd98babb7a8890f08016d5ebf.tar.gz
rails-b97f4e459707694bd98babb7a8890f08016d5ebf.tar.bz2
rails-b97f4e459707694bd98babb7a8890f08016d5ebf.zip
Fix autolinking to not include trailing tags as part of the URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/text_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index ed0f3ce91c..f56207f1f1 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -119,6 +119,13 @@ class TextHelperTest < Test::Unit::TestCase
assert_equal %(<p>Go to #{link3_result}. seriously, #{link3_result}? i think I'll say hello to #{email_result}. instead.</p>), auto_link(%(<p>Go to #{link3_raw}. seriously, #{link3_raw}? i think I'll say hello to #{email_raw}. instead.</p>))
end
+ def test_auto_link_at_eol
+ url1 = "http://api.rubyonrails.com/Foo.html"
+ url2 = "http://www.ruby-doc.org/core/Bar.html"
+
+ assert_equal %(<p><a href="#{url1}">#{url1}</a><br /><a href="#{url2}">#{url2}</a><br /></p>), auto_link("<p>#{url1}<br />#{url2}<br /></p>")
+ end
+
def test_sanitize_form
raw = "<form action=\"/foo/bar\" method=\"post\"><input></form>"
result = sanitize(raw)