rails_autolink 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,18 +60,18 @@ module RailsAutolink
60
60
  options.reverse_merge!(:link => :all, :html => {})
61
61
  sanitize = (options[:sanitize] != false)
62
62
  sanitize_options = options[:sanitize_options] || {}
63
- text = case options[:link].to_sym
63
+ text = conditional_sanitize(text, sanitize, sanitize_options).to_str
64
+ case options[:link].to_sym
64
65
  when :all then conditional_html_safe(auto_link_email_addresses(auto_link_urls(text, options[:html], options, &block), options[:html], &block), sanitize)
65
66
  when :email_addresses then conditional_html_safe(auto_link_email_addresses(text, options[:html], &block), sanitize)
66
67
  when :urls then conditional_html_safe(auto_link_urls(text, options[:html], options, &block), sanitize)
67
68
  end
68
- conditional_sanitize(text, sanitize, sanitize_options).to_str
69
69
  end
70
70
 
71
71
  private
72
72
 
73
73
  AUTO_LINK_RE = %r{
74
- (?: ([0-9A-Za-z+.:-]+:)// | www\. )
74
+ (?: ((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs):)// | www\. )
75
75
  [^\s<]+
76
76
  }x
77
77
 
@@ -1,5 +1,5 @@
1
1
  module RailsAutolink
2
- VERSION = '1.0.8'
2
+ VERSION = '1.0.9'
3
3
 
4
4
  class Railtie < ::Rails::Railtie
5
5
  initializer 'rails_autolink' do |app|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_autolink
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 8
10
- version: 1.0.8
9
+ - 9
10
+ version: 1.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aaron Patterson
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-05-24 00:00:00 Z
20
+ date: 2012-05-26 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails