Ticket #10336: auto_link_re_patch.diff
| File auto_link_re_patch.diff, 1.5 kB (added by dim, 11 months ago) |
|---|
-
actionpack/test/template/text_helper_test.rb
old new 243 243 assert_equal %(<p><a href="#{url1}">#{url1}</a><br /><a href="#{url2}">#{url2}</a><br /></p>), auto_link("<p>#{url1}<br />#{url2}<br /></p>") 244 244 end 245 245 246 def test_auto_link_with_dot_at_eol 247 url1 = "http://retrospectiva.org/wiki/" 248 assert_equal %(<p>See <a href="#{url1}">#{url1}</a>.</p>), auto_link("<p>See #{url1}.</p>") 249 end 250 246 251 def test_auto_link_with_block 247 252 url = "http://api.rubyonrails.com/Foo.html" 248 253 email = "fantabulous@shiznadel.ic" -
actionpack/lib/action_view/helpers/text_helper.rb
old new 436 436 [-\w]+ # subdomain or domain 437 437 (?:\.[-\w]+)* # remaining subdomains or domain 438 438 (?::\d+)? # port 439 (?:/(?:(?:[~\w\+@%-]|(?:[,.;:][^\s $]))+)?)* # path439 (?:/(?:(?:[~\w\+@%-]|(?:[,.;:][^\s<$]))+)?)* # path 440 440 (?:\?[\w\+@%&=.;-]+)? # query string 441 441 (?:\#[\w\-]*)? # trailing anchor 442 442 )