mail_auto_link_obfuscation 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dee9d1bbca77cdfcb0248c992ba4872d80fbdf0cec4ca088a0166bc759509f0d
|
4
|
+
data.tar.gz: 240eb4f1ec48464942f69da56e602c7063dda95c01def587e159c082a79b7a39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b26daeba15e0677bca9fc536d6be3107a868a1323a50693661432a43af559207d797cc1e92a5ad5229e89124d67bd9ec8e23001f7d5412a5d6bc29d83d131932
|
7
|
+
data.tar.gz: 1dd7daf24ca4da49ec31fac451ef241d0eae42769cca3d062f3250f14082adee343bb0572b83be620eeb8eeb0d29357f560dd4916485231c4fe267b0d5b9185f
|
@@ -31,8 +31,8 @@ module MailAutoLinkObfuscation
|
|
31
31
|
|
32
32
|
def extract_link_whitelist_from(doc)
|
33
33
|
return Set.new unless doc
|
34
|
-
whitelist = doc.xpath('//@href').map { |href| href.content.sub(/\Amailto
|
35
|
-
whitelist.merge(whitelist.map { |href| href.sub(%r{\A
|
34
|
+
whitelist = doc.xpath('//@href').map { |href| href.content.sub(/\Amailto:|[?#].*\z/, '') }.to_set
|
35
|
+
whitelist.merge(whitelist.map { |href| href.sub(%r{\A\w+://}, '') })
|
36
36
|
end
|
37
37
|
|
38
38
|
def html_body_doc
|