css_parser 3.4.0 → 3.5.0
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 +4 -4
- data/lib/css_parser/version.rb +1 -1
- data/lib/css_parser.rb +2 -0
- 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: 54ed8796457a4dcf8cd4f88ea24c7b5acacc33077e8a0d56cc1fe959e8ac1078
|
|
4
|
+
data.tar.gz: c90bcaf21d9f0e2b54e7bf3e82c937addf88b116a7f01b76332f71bd4bf50c0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f804ab2b806b17a46005a3d5f70098e80bc427d541a25fd66c0097a8c7937e7664800b2722680f0de61c14bc98e06bdae2f70a7e8f8a575ac497b610fb2d2db
|
|
7
|
+
data.tar.gz: cdd349012afe75f37f053928e6535307877d7a9ce11ed678ed93dad5a59245a28061354b054e293aee7878a73679d9cb3e414a1c407e399da62d21f2d7c863a2
|
data/lib/css_parser/version.rb
CHANGED
data/lib/css_parser.rb
CHANGED
|
@@ -135,6 +135,8 @@ module CssParser
|
|
|
135
135
|
|
|
136
136
|
css.gsub(URI_RX) do
|
|
137
137
|
uri = Regexp.last_match(1).to_s.gsub(/["']+/, '')
|
|
138
|
+
# white space is allowed between the parentheses and the URI: https://www.w3.org/TR/CSS21/syndata.html#uri
|
|
139
|
+
uri.strip!
|
|
138
140
|
# Don't process URLs that are already absolute
|
|
139
141
|
unless uri.match?(%r{^[a-z]+://}i)
|
|
140
142
|
begin
|