string_tools 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/lib/string_tools/version.rb +1 -1
- data/lib/string_tools.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 518b671cee6921170a923aec262e1da3552c586c87540db9d8ab232e90104eb1
|
4
|
+
data.tar.gz: 573cf234c034abf50ecc23c7ae016a0aafd63038c8b0af589a04e54b6077ddf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667b2621aadf33fd77f3b1d003105adb982959cfc30d5694626480e52704c68e87bf9c0171ec6d0fa44eb353966de1ea78e053d1c2ac6c4e2bc2705baadd41c5
|
7
|
+
data.tar.gz: 8f5f2d10969a4b30f80ec931f7f2451653e3437e7400caff6bc58621535af396eed2049532abd6f3c30e9a08927b4ef3e47b8adfb11456431e7d0706b216f289
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# v1.
|
1
|
+
# v1.3.0
|
2
|
+
|
3
|
+
* 2024-11-15 [771ba6b](../../commit/771ba6b) - __(git3-railsc)__ Release 1.3.0
|
4
|
+
* 2024-09-20 [cba6db7](../../commit/cba6db7) - __(bayerd412)__ feat(ck-editor video hosting): add rutube
|
5
|
+
https://jira.railsc.ru/browse/PC4-31420
|
2
6
|
|
3
7
|
* 2024-04-08 [be7e7fd](../../commit/be7e7fd) - __(Andrew N. Shalaev)__ Release v1.2.0
|
4
8
|
* 2023-11-29 [393bb13](../../commit/393bb13) - __(GIGrave)__ feature: add media to sanitize rules
|
@@ -117,6 +121,21 @@ https://jira.railsc.ru/browse/PC4-16353
|
|
117
121
|
# v3.0.1
|
118
122
|
|
119
123
|
|
124
|
+
# v1.2.0
|
125
|
+
|
126
|
+
* 2023-11-29 [393bb13](../../commit/393bb13) - __(GIGrave)__ feature: add media to sanitize rules
|
127
|
+
https://jira.railsc.ru/browse/BPC-22916
|
128
|
+
|
129
|
+
* 2023-11-29 [06eb51e](../../commit/06eb51e) - __(GIGrave)__ Revert "feature: add string_tools config"
|
130
|
+
This reverts commit c0b9bf39ec3cf2fce28fe92c7892a0c47593ca09.
|
131
|
+
|
132
|
+
* 2023-11-29 [d1c00b9](../../commit/d1c00b9) - __(GIGrave)__ Revert "fix: add postgress to drone"
|
133
|
+
This reverts commit 33e5698fd48d5edf416df316e3466f9e6c58369f.
|
134
|
+
|
135
|
+
* 2023-11-02 [33e5698](../../commit/33e5698) - __(GIGrave)__ fix: add postgress to drone
|
136
|
+
* 2023-11-02 [c0b9bf3](../../commit/c0b9bf3) - __(GIGrave)__ feature: add string_tools config
|
137
|
+
https://jira.railsc.ru/browse/BPC-22612
|
138
|
+
|
120
139
|
# v1.1.0
|
121
140
|
|
122
141
|
* 2023-08-29 [bed389b](../../commit/bed389b) - __(Terentev Aleksey)__ feat: sanitize links in alt of img tag
|
data/lib/string_tools/version.rb
CHANGED
data/lib/string_tools.rb
CHANGED
@@ -226,6 +226,9 @@ module StringTools
|
|
226
226
|
end
|
227
227
|
|
228
228
|
class IframeNormalizer
|
229
|
+
HOSTING_REG = %r{^https?:\/\/(www\.)?(?:(rutube\.ru\/(video|play|embed))|
|
230
|
+
(youtu((?:be|\.be|be\-nocookie)(?:\/|\.com\/(watch|shorts|embed)))))}x.freeze
|
231
|
+
|
229
232
|
def initialize(attributes)
|
230
233
|
@attributes = attributes
|
231
234
|
end
|
@@ -235,7 +238,7 @@ module StringTools
|
|
235
238
|
|
236
239
|
return unless node.name == 'iframe'
|
237
240
|
|
238
|
-
unless node[:src] =~
|
241
|
+
unless node[:src] =~ HOSTING_REG
|
239
242
|
node.unlink
|
240
243
|
return
|
241
244
|
end
|
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey D.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|