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.
- data/lib/rails_autolink/helpers.rb +3 -3
- data/lib/rails_autolink.rb +1 -1
- metadata +4 -4
@@ -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 =
|
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
|
-
(?: (
|
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
|
|
data/lib/rails_autolink.rb
CHANGED
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:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
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-
|
20
|
+
date: 2012-05-26 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|