html-proofer 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dedcfc1984f26487844d245c52059298bea6e981
4
- data.tar.gz: 911a306eda4d6bf1ba277c73ec3c6f7bd2d44cf8
3
+ metadata.gz: bf234c7862c1fe6181713df3c1437f906ed23b26
4
+ data.tar.gz: c4c88cabbc46a02bc1c1af319ec7f72c36a3cf9e
5
5
  SHA512:
6
- metadata.gz: 6d02739f1118f0d0dbafa398d5d3409f2a0be97036b5eaf6ea7b8879248a7805a7467c87bfdddd2c7aab821d95f61576fb2ba4bee448548b783cf9790d46139f
7
- data.tar.gz: 41d65361acdae9db455fafda8bc6c138f43106fd217a4eca92fab27486feffb4c71d315eaa3bec9b4eab9ac845ed264c35c2844ac9df46f1405a2570041a7f5c
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
 
@@ -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
- matches = string.scan(%r{https?://([^>]+)}i)
36
-
37
- matches.flatten.each do |url|
38
- escaped_url = url.gsub(/&(?!amp;)/, '&amp;')
39
- string.gsub!(url, escaped_url)
35
+ string.gsub(%r{https?://([^>]+)}i) do |url|
36
+ url.gsub(/&(?!amp;)/, '&amp;')
40
37
  end
41
- string
42
38
  end
43
39
  module_function :clean_content
44
40
  end
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = '2.6.1'
3
+ VERSION = '2.6.2'
4
4
  end
5
5
  end
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.1
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: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mercenary