string_tools 0.11.0 → 0.11.1
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 +4 -4
- data/lib/string_tools.rb +2 -2
- data/lib/string_tools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13394c670977440265f3464ea3c9cb8fb0a6328a
|
4
|
+
data.tar.gz: 258aae06f63d7e9c39ccd9f39bc0cd3b6cee645c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70934a4015c8ddbb022d1b9e1ef3e806cb8c04b07ad2a93c9c86ba64823dbfc89667b0d2f768ac2096674a309154caca078d5eeed27f61668e70d70e67c62c94
|
7
|
+
data.tar.gz: b91d24e15dbe8c62540d246e01a367864e1b511fcdaf904b5f3cba0aa2969cefe5f00955109cb6228d084f8c90a829d40d444c2dc09336d62156e94fa892c119
|
data/lib/string_tools.rb
CHANGED
@@ -137,7 +137,7 @@ module StringTools
|
|
137
137
|
#
|
138
138
|
# Returns String
|
139
139
|
def strip_tags_leave_br(string)
|
140
|
-
sanitized = Sanitize.fragment(string, remove_contents: %w(style
|
140
|
+
sanitized = Sanitize.fragment(string, remove_contents: %w(style script), elements: %w(p ul li br blockquote))
|
141
141
|
|
142
142
|
sanitized.gsub!(/<(p|li|blockquote)[^>]*>/, '')
|
143
143
|
sanitized.gsub!(%r{<(br /|ul[^>]*|/[^>]*)>}, '<br />')
|
@@ -182,7 +182,7 @@ module StringTools
|
|
182
182
|
:attributes => attributes,
|
183
183
|
:elements => elements,
|
184
184
|
:css => {:properties => Sanitize::Config::RELAXED[:css][:properties]},
|
185
|
-
:remove_contents => %w(style
|
185
|
+
:remove_contents => %w(style script),
|
186
186
|
:allow_comments => false,
|
187
187
|
:transformers => transformers
|
188
188
|
)
|
data/lib/string_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey D.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
requirements: []
|
241
241
|
rubyforge_project:
|
242
|
-
rubygems_version: 2.6.
|
242
|
+
rubygems_version: 2.6.10
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: String Tools
|