Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6495 from homakov/3-0-stable

auto_link shouldn't always sanitize
  • Loading branch information...
commit 5989ffbe0373b660883f6a59daa57179f896fbe6 2 parents f7cf745 + f35c93f
Rafael Mendonça França rafaelfranca authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/text_helper.rb
4 actionpack/lib/action_view/helpers/text_helper.rb
View
@@ -463,7 +463,7 @@ def set_cycle(name, cycle_object)
end
AUTO_LINK_RE = %r{
- (?: ([\w+.:-]+:)// | www\. )
+ (?: ((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs):)// | www\. )
[^\s<]+
}x
@@ -499,7 +499,7 @@ def auto_link_urls(text, html_options = {}, options = {})
href = 'http://' + href unless scheme
sanitize_link = options[:sanitize] != false
- sanitize(content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize_link) + punctuation.reverse.join(''))
+ content_tag(:a, link_text, link_attributes.merge('href' => href), sanitize_link) + punctuation.reverse.join('')
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.