loofah 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of loofah might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/lib/loofah.rb +1 -1
- data/lib/loofah/html5/safelist.rb +3 -0
- data/lib/loofah/html5/scrub.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce7e800422f2b83325a3c37aeb81c5fcb7f2c6d76d9be1f5228f3d49077643b8
|
4
|
+
data.tar.gz: 6f4a5303926248d42f4e375d59d8d92e60c7fb797762910dd027aa54d8875922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98570a9ed755a285a42b31c05b8f45413b77119162d190c199f2ea8624f1038cff8ce8532e4339e3747410c9ab8ca645b02f237975643d24b4ad3b447336a35a
|
7
|
+
data.tar.gz: '020485b66a1cb57fe1359bfbeec912631a48b268bbeb754b2ff67fa237cbb840d8ad5e66ec8b64b36d869dcf6866bd3c30191e3596a6481fd9a9258b0f4f8d96'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.7.0 / 2020-08-26
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
* Allow CSS properties `page-break-before`, `page-break-inside`, and `page-break-after`. [[#190](https://github.com/flavorjones/loofah/issues/190)] (Thanks, [@ahorek](https://github.com/ahorek)!)
|
8
|
+
|
9
|
+
|
10
|
+
### Fixes
|
11
|
+
|
12
|
+
* Don't drop the `!important` rule from some CSS properties. [[#191](https://github.com/flavorjones/loofah/issues/191)] (Thanks, [@b7kich](https://github.com/b7kich)!)
|
13
|
+
|
14
|
+
|
3
15
|
## 2.6.0 / 2020-06-16
|
4
16
|
|
5
17
|
### Features
|
data/Gemfile
CHANGED
@@ -10,7 +10,7 @@ gem "crass", "~>1.0.2"
|
|
10
10
|
gem "rake", "~>12.3", :group => [:development, :test]
|
11
11
|
gem "minitest", "~>2.2", :group => [:development, :test]
|
12
12
|
gem "rr", "~>1.2.0", :group => [:development, :test]
|
13
|
-
gem "json", "~>2.
|
13
|
+
gem "json", "~>2.3.0", :group => [:development, :test]
|
14
14
|
gem "hoe-gemspec", "~>1.0", :group => [:development, :test]
|
15
15
|
gem "hoe-debugging", "~>2.0", :group => [:development, :test]
|
16
16
|
gem "hoe-bundler", "~>1.5", :group => [:development, :test]
|
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ Hoe.spec "loofah" do
|
|
27
27
|
extra_dev_deps << ["rake", "~> 12.3"]
|
28
28
|
extra_dev_deps << ["minitest", "~>2.2"]
|
29
29
|
extra_dev_deps << ["rr", "~>1.2.0"]
|
30
|
-
extra_dev_deps << ["json", "~> 2.
|
30
|
+
extra_dev_deps << ["json", "~> 2.3.0"]
|
31
31
|
extra_dev_deps << ["hoe-gemspec", "~> 1.0"]
|
32
32
|
extra_dev_deps << ["hoe-debugging", "~> 2.0"]
|
33
33
|
extra_dev_deps << ["hoe-bundler", "~> 1.5"]
|
data/lib/loofah.rb
CHANGED
data/lib/loofah/html5/scrub.rb
CHANGED
@@ -8,6 +8,7 @@ module Loofah
|
|
8
8
|
CONTROL_CHARACTERS = /[`\u0000-\u0020\u007f\u0080-\u0101]/
|
9
9
|
CSS_KEYWORDISH = /\A(#[0-9a-fA-F]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|-?\d{0,3}\.?\d{0,10}(ch|cm|r?em|ex|in|lh|mm|pc|pt|px|Q|vmax|vmin|vw|vh|%|,|\))?)\z/
|
10
10
|
CRASS_SEMICOLON = { :node => :semicolon, :raw => ";" }
|
11
|
+
CSS_IMPORTANT = '!important'
|
11
12
|
|
12
13
|
class << self
|
13
14
|
def allowed_element?(element_name)
|
@@ -90,6 +91,7 @@ module Loofah
|
|
90
91
|
end
|
91
92
|
end.compact
|
92
93
|
unless value.empty?
|
94
|
+
value << CSS_IMPORTANT if node[:important]
|
93
95
|
propstring = sprintf "%s:%s", name, value.join(" ")
|
94
96
|
sanitized_node = Crass.parse_properties(propstring).first
|
95
97
|
sanitized_tree << sanitized_node << CRASS_SEMICOLON
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loofah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 2.
|
90
|
+
version: 2.3.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 2.
|
97
|
+
version: 2.3.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: hoe-gemspec
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|