html-proofer 2.6.1 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html/proofer/checks/links.rb +3 -0
- data/lib/html/proofer/utils.rb +2 -6
- data/lib/html/proofer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf234c7862c1fe6181713df3c1437f906ed23b26
|
4
|
+
data.tar.gz: c4c88cabbc46a02bc1c1af319ec7f72c36a3cf9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63f2b3ff9371bfb1c2970c3a7655a8a1a537e6292bf5764c6dbb3989719af85d293d7b7f942c6892ac61d908e652e22aeadd180c907cd6b9bd6bad9bf5fdefd4
|
7
|
+
data.tar.gz: 41f7f1ee172557d380139a534fff028370765cb25b4694dbf2c5730c1a5ed4e3e3c78bca901c04e59a9dc9ead67ae28769dbd62e41045800ad835cb1bec37088
|
@@ -117,8 +117,11 @@ class LinkCheck < ::HTML::Proofer::CheckRunner
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def hash_check(html, href_hash)
|
120
|
+
decoded_href_hash = URI.decode(href_hash)
|
120
121
|
html.xpath("//*[case_insensitive_equals(@id, '#{href_hash}')]", \
|
121
122
|
"//*[case_insensitive_equals(@name, '#{href_hash}')]", \
|
123
|
+
"//*[case_insensitive_equals(@id, '#{decoded_href_hash}')]", \
|
124
|
+
"//*[case_insensitive_equals(@name, '#{decoded_href_hash}')]", \
|
122
125
|
HTML::Proofer::XpathFunctions.new).length > 0
|
123
126
|
end
|
124
127
|
|
data/lib/html/proofer/utils.rb
CHANGED
@@ -32,13 +32,9 @@ module HTML
|
|
32
32
|
# problem from http://git.io/vBYU1
|
33
33
|
# solution from http://git.io/vBYUi
|
34
34
|
def clean_content(string)
|
35
|
-
|
36
|
-
|
37
|
-
matches.flatten.each do |url|
|
38
|
-
escaped_url = url.gsub(/&(?!amp;)/, '&')
|
39
|
-
string.gsub!(url, escaped_url)
|
35
|
+
string.gsub(%r{https?://([^>]+)}i) do |url|
|
36
|
+
url.gsub(/&(?!amp;)/, '&')
|
40
37
|
end
|
41
|
-
string
|
42
38
|
end
|
43
39
|
module_function :clean_content
|
44
40
|
end
|
data/lib/html/proofer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-proofer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|