html-proofer 3.12.1 → 3.12.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/check/links.rb +4 -2
- data/lib/html-proofer/version.rb +1 -1
- 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: 0cfdbe4be04941b199d07fc15a237d5696d06980acde4192c0604935126e00ce
|
4
|
+
data.tar.gz: 8a682b08550dae3ea1a823b66251dc5bddffb27ab8e431d98d4b9a1152e721d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4c9ab7f8f225325ead82e8a2da9b7c11bd7d2e7aa9d03edb041cb96ffd6099f40489acd85325b591952b79aaffa8e10558fffd07c883f01966d6dcc087126e
|
7
|
+
data.tar.gz: 772d2e3c9ba8fcd4f5678767f876e1f51ebd5bbe957fdf5a6687b65f2cba2b981e3067b07a2c08ff79f67b085b2b1bf81b0c54f1584ee945cff3aeecd46e44dc
|
@@ -129,10 +129,12 @@ class LinkCheck < ::HTMLProofer::Check
|
|
129
129
|
html.xpath(*xpaths)
|
130
130
|
end
|
131
131
|
|
132
|
-
|
132
|
+
# Whitelist for affected elements from Subresource Integrity specification
|
133
|
+
# https://w3c.github.io/webappsec-subresource-integrity/#link-element-for-stylesheets
|
134
|
+
SRI_REL_TYPES = %(stylesheet)
|
133
135
|
|
134
136
|
def check_sri(line, content)
|
135
|
-
return
|
137
|
+
return unless SRI_REL_TYPES.include?(@link.rel)
|
136
138
|
if !defined?(@link.integrity) && !defined?(@link.crossorigin)
|
137
139
|
add_issue("SRI and CORS not provided in: #{@link.src}", line: line, content: content)
|
138
140
|
elsif !defined?(@link.integrity)
|
data/lib/html-proofer/version.rb
CHANGED