Skip to content
This repository
Browse code

auto_link final sanitize

  • Loading branch information...
commit 3af33856d7d7a4eb718329e5aab16f1d17db8c88 1 parent e74e479
Egor Homakov authored May 25, 2012
4  actionpack/lib/action_view/helpers/text_helper.rb
@@ -498,8 +498,8 @@ def auto_link_urls(text, html_options = {}, options = {})
498 498
               link_text = block_given? ? yield(href) : href
499 499
               href = 'http://' + href unless scheme
500 500
 
501  
-              sanitize = options[:sanitize] != false
502  
-              content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize) + punctuation.reverse.join('')
  501
+              sanitize_link = options[:sanitize] != false
  502
+              sanitize(content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize_link) + punctuation.reverse.join(''))
503 503
             end
504 504
           end
505 505
         end

0 notes on commit 3af3385

Please sign in to comment.
Something went wrong with that request. Please try again.