Permalink
Browse files

auto_link final sanitize

  • Loading branch information...
1 parent e74e479 commit 3af33856d7d7a4eb718329e5aab16f1d17db8c88 @homakov homakov committed May 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/text_helper.rb
@@ -498,8 +498,8 @@ def auto_link_urls(text, html_options = {}, options = {})
link_text = block_given? ? yield(href) : href
href = 'http://' + href unless scheme
- sanitize = options[:sanitize] != false
- content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize) + punctuation.reverse.join('')
+ sanitize_link = options[:sanitize] != false
+ sanitize(content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize_link) + punctuation.reverse.join(''))
end
end
end

0 comments on commit 3af3385

Please sign in to comment.