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: c2948cc471a88e74bf746bde7c3dd0fe62f74b59ea27033141db950e24874698
4
- data.tar.gz: fade272238e1ae473be653d41d7ba2573e67c726857d31cf5b2a47cf6fb759f1
3
+ metadata.gz: dee9d1bbca77cdfcb0248c992ba4872d80fbdf0cec4ca088a0166bc759509f0d
4
+ data.tar.gz: 240eb4f1ec48464942f69da56e602c7063dda95c01def587e159c082a79b7a39
5
5
  SHA512:
6
- metadata.gz: 6f5316cd0f3186358fe1caf13ca1aa336213f1f63951d98c5699150abb01626fdae5f035ac31aaeb427a2b53fdfd189aa78810ed518d70e96a63ee0bd1c45ce4
7
- data.tar.gz: dec4b7adea39469eec703a2fa34df8a6024cf8741b75974c1a01383da471859c6fc1dade9f79407dd657c3d96068bd4d7930111524a76e6f4728c315388c4432
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:/, '') }.to_set
35
- whitelist.merge(whitelist.map { |href| href.sub(%r{\A[a-z]+://}, '') })
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MailAutoLinkObfuscation
4
- VERSION = '0.2.8'
4
+ VERSION = '0.2.9'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_auto_link_obfuscation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Jundt