udup 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/udup/main.rb +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0547bade9bfbb824417c7e7cd2ef94a24765ab1e6bd5e187969f67d4c5fec6b
|
4
|
+
data.tar.gz: 621b668409f97f40156941bcaa9b8eff799ffb36c1dba316bb236da1dd31eb83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d31c66dd8053ab084a8033320435206cb1fc61b0812ffe090eefce4454fcad140f839d9f000504d0901c42d2b8c8619ecc48caa9ae99a49ad8f6e873ece1c473
|
7
|
+
data.tar.gz: 2c807c6005dbea210f9454c5bf0f8b3adc843835d17c3968aea059bbdca3f74cf766d1eee059cbc79bd2c0e1d6838c1a996faeb482be4242408be45aa1db8f65
|
data/lib/udup/main.rb
CHANGED
@@ -8,12 +8,10 @@ class Udup
|
|
8
8
|
@valid_urls = {}
|
9
9
|
@skip_exts = options[:skip_exts] || %w[.css .png .jpg .jpeg .svg .ico .webp .ttf .otf .woff .woff2 .gif .pdf .bmp
|
10
10
|
.eot .mp3 .mp4 .avi]
|
11
|
-
@content_to_skip =
|
11
|
+
@content_to_skip = %r{blog|docs|post|support|pages?/\d+|articles?/\d+|\d{2,}}i
|
12
12
|
@bad_char_path = options[:bad_char_path] || %w[+ ' " ( ) \\ <]
|
13
13
|
end
|
14
14
|
|
15
|
-
# filter : Filter URLS <img src=x onerror=alert(1)>
|
16
|
-
# @param [Array
|
17
15
|
def filter(urls)
|
18
16
|
final_urls = Set[]
|
19
17
|
|
@@ -75,6 +73,6 @@ class Udup
|
|
75
73
|
end
|
76
74
|
|
77
75
|
def content_to_skip?(path)
|
78
|
-
|
76
|
+
path.match?(@content_to_skip)
|
79
77
|
end
|
80
78
|
end
|