ubbparser 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/ubbparser.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 16f1bf18920e375fcb23a38b9a234e32ba1764f9c2567065249a8df9b663dd4e
|
|
4
|
+
data.tar.gz: ca56a762e0c950efd5850e8837b96f2848ead6b3501e4b0771d045311771b31b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f7d0a54e69e7bb249c3891b0957d6a38e6581be8b22fcf8e6db4e66ab034968066d13dba3699dae0335e016471b75394db37242025a32b2d7b664ef0e9ece06
|
|
7
|
+
data.tar.gz: fe90b1550f940172978affb1486e0f2fa463b6e3e95a1a86c3faea161e9d76c8ab1ffaa04ebe73808844de90cfb7d0bda66a5c38771decaa8f330df9640b5205
|
data/lib/ubbparser.rb
CHANGED
|
@@ -86,7 +86,7 @@ module UBBParser
|
|
|
86
86
|
untagged_text = CGI.escapeHTML(scnr.scan(/[^\[]*/))
|
|
87
87
|
|
|
88
88
|
# check for untagged url's
|
|
89
|
-
uri_pattern = /(((
|
|
89
|
+
uri_pattern = /((([a-z]+)\:\/\/)|(www))[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\'\/\\\+&%\$#\=~])*[^\.\,\)\(\s]*/
|
|
90
90
|
untagged_text.gsub!(uri_pattern) { |url,| render_url(url, {}, parse_options) }
|
|
91
91
|
|
|
92
92
|
# check for untagged emails
|
|
@@ -501,7 +501,7 @@ module UBBParser
|
|
|
501
501
|
inner_text = parse(inner_text, parse_options) if !attributes[:default].nil?
|
|
502
502
|
url = (attributes[:default] || inner_text)
|
|
503
503
|
url = 'http://' + url if (url.start_with?('www.'))
|
|
504
|
-
target = (url.
|
|
504
|
+
target = (url.match(/^(http|https):\/\//)) ? " target='_blank'" : ''
|
|
505
505
|
url = @@file_url_convert_method.call(url) unless @@file_url_convert_method.nil?
|
|
506
506
|
url.to_s.gsub!(/\\|'/) { |c| "\\#{c}" }
|
|
507
507
|
css_class = parse_options[:class_url] || 'ubb-url'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ubbparser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Taco Jan Osinga
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A simple and flexibel ubb parser.
|
|
14
14
|
email: info@osingasoftware.nl
|
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
37
37
|
version: '0'
|
|
38
38
|
requirements: []
|
|
39
39
|
rubyforge_project:
|
|
40
|
-
rubygems_version: 2.
|
|
40
|
+
rubygems_version: 2.7.7
|
|
41
41
|
signing_key:
|
|
42
42
|
specification_version: 4
|
|
43
43
|
summary: UBB Parser
|