loofah 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce7e800422f2b83325a3c37aeb81c5fcb7f2c6d76d9be1f5228f3d49077643b8
4
- data.tar.gz: 6f4a5303926248d42f4e375d59d8d92e60c7fb797762910dd027aa54d8875922
3
+ metadata.gz: af120a1d5829e0f0a9676dddd8b9b112a432c6f05c65b2522d8d1aafe8bde311
4
+ data.tar.gz: a19cfbdb4c3751332d471478718ae384dde5ef970ac482f5f0fb2a027561c0d6
5
5
  SHA512:
6
- metadata.gz: 98570a9ed755a285a42b31c05b8f45413b77119162d190c199f2ea8624f1038cff8ce8532e4339e3747410c9ab8ca645b02f237975643d24b4ad3b447336a35a
7
- data.tar.gz: '020485b66a1cb57fe1359bfbeec912631a48b268bbeb754b2ff67fa237cbb840d8ad5e66ec8b64b36d869dcf6866bd3c30191e3596a6481fd9a9258b0f4f8d96'
6
+ metadata.gz: 93bbb41db6d1edd130d6c83fba87e70c145ec01f57120b406096ae56e7993f56803e04d40ee50faaf2f48fb3a2f6d704e5659923d8e5c04f62f6989591e37fa4
7
+ data.tar.gz: 8d7fd16c9ba849ae552c22bc37795efc1b1382d8ef83816ad2f66a868d7e9628562e7581af67a5ab7c5ab50ff7da26ebbb13b7b38099da72859583cd5ef1aa3b
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 2.8.0 / 2020-11-25
4
+
5
+ * Allow CSS properties `order`, `flex-direction`, `flex-grow`, `flex-wrap`, `flex-shrink`, `flex-flow`, `flex-basis`, `flex`, `justify-content`, `align-self`, `align-items`, and `align-content`. [[#197](https://github.com/flavorjones/loofah/issues/197)] (Thanks, [@miguelperez](https://github.com/miguelperez)!)
6
+
7
+
3
8
  ## 2.7.0 / 2020-08-26
4
9
 
5
10
  ### Features
data/README.md CHANGED
@@ -6,10 +6,9 @@
6
6
 
7
7
  ## Status
8
8
 
9
- |System|Status|
10
- |--|--|
11
- | Concourse CI | [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/loofah/jobs/ruby-2.5/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/loofah?groups=master) |
12
- | Code Climate | [![Code Climate](https://codeclimate.com/github/flavorjones/loofah.svg)](https://codeclimate.com/github/flavorjones/loofah) |
9
+ [![Concourse CI](https://ci.nokogiri.org/api/v1/teams/nokogiri-core/pipelines/loofah/jobs/ruby-2.5/badge)](https://ci.nokogiri.org/teams/nokogiri-core/pipelines/loofah?groups=master)
10
+ [![Code Climate](https://codeclimate.com/github/flavorjones/loofah.svg)](https://codeclimate.com/github/flavorjones/loofah)
11
+ [![Tidelift dependencies](https://tidelift.com/badges/package/rubygems/loofah)](https://tidelift.com/subscription/pkg/rubygems-loofah?utm_source=rubygems-loofah&utm_medium=referral&utm_campaign=readme)
13
12
 
14
13
 
15
14
  ## Description
@@ -301,6 +300,10 @@ And the mailing list is on Google Groups:
301
300
 
302
301
  And the IRC channel is \#loofah on freenode.
303
302
 
303
+ Consider subscribing to [Tidelift][tidelift] which provides license assurances and timely security notifications for your open source dependencies, including Loofah. [Tidelift][tidelift] subscriptions also help the Loofah maintainers fund our [automated testing](https://ci.nokogiri.org) which in turn allows us to ship releases, bugfixes, and security updates more often.
304
+
305
+ [tidelift]: https://tidelift.com/subscription/pkg/rubygems-loofah?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise
306
+
304
307
 
305
308
  ## Security
306
309
 
@@ -3,21 +3,22 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.i
3
3
 
4
4
  require "nokogiri"
5
5
 
6
- require "loofah/metahelpers"
7
- require "loofah/elements"
6
+ require_relative "loofah/version"
7
+ require_relative "loofah/metahelpers"
8
+ require_relative "loofah/elements"
8
9
 
9
- require "loofah/html5/safelist"
10
- require "loofah/html5/libxml2_workarounds"
11
- require "loofah/html5/scrub"
10
+ require_relative "loofah/html5/safelist"
11
+ require_relative "loofah/html5/libxml2_workarounds"
12
+ require_relative "loofah/html5/scrub"
12
13
 
13
- require "loofah/scrubber"
14
- require "loofah/scrubbers"
14
+ require_relative "loofah/scrubber"
15
+ require_relative "loofah/scrubbers"
15
16
 
16
- require "loofah/instance_methods"
17
- require "loofah/xml/document"
18
- require "loofah/xml/document_fragment"
19
- require "loofah/html/document"
20
- require "loofah/html/document_fragment"
17
+ require_relative "loofah/instance_methods"
18
+ require_relative "loofah/xml/document"
19
+ require_relative "loofah/xml/document_fragment"
20
+ require_relative "loofah/html/document"
21
+ require_relative "loofah/html/document_fragment"
21
22
 
22
23
  # == Strings and IO Objects as Input
23
24
  #
@@ -28,9 +29,6 @@ require "loofah/html/document_fragment"
28
29
  # quantities of docs.
29
30
  #
30
31
  module Loofah
31
- # The version of Loofah you are using
32
- VERSION = "2.7.0"
33
-
34
32
  class << self
35
33
  # Shortcut for Loofah::HTML::Document.parse
36
34
  # This method accepts the same parameters as Nokogiri::HTML::Document.parse
@@ -549,6 +549,9 @@ module Loofah
549
549
 
550
550
  ACCEPTABLE_CSS_PROPERTIES = Set.new([
551
551
  "azimuth",
552
+ "align-content",
553
+ "align-items",
554
+ "align-self",
552
555
  "background-color",
553
556
  "border-bottom-color",
554
557
  "border-collapse",
@@ -562,6 +565,13 @@ module Loofah
562
565
  "direction",
563
566
  "display",
564
567
  "elevation",
568
+ "flex",
569
+ "flex-basis",
570
+ "flex-direction",
571
+ "flex-flow",
572
+ "flex-grow",
573
+ "flex-shrink",
574
+ "flex-wrap",
565
575
  "float",
566
576
  "font",
567
577
  "font-family",
@@ -570,11 +580,13 @@ module Loofah
570
580
  "font-variant",
571
581
  "font-weight",
572
582
  "height",
583
+ "justify-content",
573
584
  "letter-spacing",
574
585
  "line-height",
575
586
  "list-style",
576
587
  "list-style-type",
577
588
  "max-width",
589
+ "order",
578
590
  "overflow",
579
591
  "page-break-after",
580
592
  "page-break-before",
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ module Loofah
3
+ # The version of Loofah you are using
4
+ VERSION = "2.8.0"
5
+ end
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.7.0
4
+ version: 2.8.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-08-26 00:00:00.000000000 Z
12
+ date: 2020-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -45,28 +45,28 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '12.3'
48
+ version: '13.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '12.3'
55
+ version: '13.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: minitest
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '2.2'
62
+ version: '5.14'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '2.2'
69
+ version: '5.14'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rr
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -87,112 +87,42 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 2.3.0
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 2.3.0
98
- - !ruby/object:Gem::Dependency
99
- name: hoe-gemspec
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: '1.0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.0'
112
- - !ruby/object:Gem::Dependency
113
- name: hoe-debugging
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '2.0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '2.0'
126
- - !ruby/object:Gem::Dependency
127
- name: hoe-bundler
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '1.5'
90
+ version: '2.2'
133
91
  type: :development
134
92
  prerelease: false
135
93
  version_requirements: !ruby/object:Gem::Requirement
136
94
  requirements:
137
95
  - - "~>"
138
96
  - !ruby/object:Gem::Version
139
- version: '1.5'
97
+ version: '2.2'
140
98
  - !ruby/object:Gem::Dependency
141
- name: hoe-git
99
+ name: concourse
142
100
  requirement: !ruby/object:Gem::Requirement
143
101
  requirements:
144
102
  - - "~>"
145
103
  - !ruby/object:Gem::Version
146
- version: '1.6'
104
+ version: '0.33'
147
105
  type: :development
148
106
  prerelease: false
149
107
  version_requirements: !ruby/object:Gem::Requirement
150
108
  requirements:
151
109
  - - "~>"
152
110
  - !ruby/object:Gem::Version
153
- version: '1.6'
111
+ version: '0.33'
154
112
  - !ruby/object:Gem::Dependency
155
- name: hoe-markdown
113
+ name: rubocop
156
114
  requirement: !ruby/object:Gem::Requirement
157
115
  requirements:
158
116
  - - "~>"
159
117
  - !ruby/object:Gem::Version
160
- version: '1.2'
118
+ version: '1.1'
161
119
  type: :development
162
120
  prerelease: false
163
121
  version_requirements: !ruby/object:Gem::Requirement
164
122
  requirements:
165
123
  - - "~>"
166
124
  - !ruby/object:Gem::Version
167
- version: '1.2'
168
- - !ruby/object:Gem::Dependency
169
- name: concourse
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: 0.26.0
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: 0.26.0
182
- - !ruby/object:Gem::Dependency
183
- name: rubocop
184
- requirement: !ruby/object:Gem::Requirement
185
- requirements:
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- version: 0.76.0
189
- type: :development
190
- prerelease: false
191
- version_requirements: !ruby/object:Gem::Requirement
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- version: 0.76.0
125
+ version: '1.1'
196
126
  - !ruby/object:Gem::Dependency
197
127
  name: rdoc
198
128
  requirement: !ruby/object:Gem::Requirement
@@ -214,19 +144,19 @@ dependencies:
214
144
  - !ruby/object:Gem::Version
215
145
  version: '7'
216
146
  - !ruby/object:Gem::Dependency
217
- name: hoe
147
+ name: hoe-markdown
218
148
  requirement: !ruby/object:Gem::Requirement
219
149
  requirements:
220
150
  - - "~>"
221
151
  - !ruby/object:Gem::Version
222
- version: '3.22'
152
+ version: '1.3'
223
153
  type: :development
224
154
  prerelease: false
225
155
  version_requirements: !ruby/object:Gem::Requirement
226
156
  requirements:
227
157
  - - "~>"
228
158
  - !ruby/object:Gem::Version
229
- version: '3.22'
159
+ version: '1.3'
230
160
  description: |-
231
161
  Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri.
232
162
 
@@ -238,24 +168,12 @@ email:
238
168
  - bryan@brynary.com
239
169
  executables: []
240
170
  extensions: []
241
- extra_rdoc_files:
242
- - CHANGELOG.md
243
- - MIT-LICENSE.txt
244
- - Manifest.txt
245
- - README.md
246
- - SECURITY.md
171
+ extra_rdoc_files: []
247
172
  files:
248
173
  - CHANGELOG.md
249
- - Gemfile
250
174
  - MIT-LICENSE.txt
251
- - Manifest.txt
252
175
  - README.md
253
- - Rakefile
254
176
  - SECURITY.md
255
- - benchmark/benchmark.rb
256
- - benchmark/fragment.html
257
- - benchmark/helper.rb
258
- - benchmark/www.slashdot.com.html
259
177
  - lib/loofah.rb
260
178
  - lib/loofah/elements.rb
261
179
  - lib/loofah/helpers.rb
@@ -268,6 +186,7 @@ files:
268
186
  - lib/loofah/metahelpers.rb
269
187
  - lib/loofah/scrubber.rb
270
188
  - lib/loofah/scrubbers.rb
189
+ - lib/loofah/version.rb
271
190
  - lib/loofah/xml/document.rb
272
191
  - lib/loofah/xml/document_fragment.rb
273
192
  homepage: https://github.com/flavorjones/loofah
@@ -275,14 +194,12 @@ licenses:
275
194
  - MIT
276
195
  metadata:
277
196
  homepage_uri: https://github.com/flavorjones/loofah
197
+ source_code_uri: https://github.com/flavorjones/loofah
278
198
  bug_tracker_uri: https://github.com/flavorjones/loofah/issues
279
- documentation_uri: https://www.rubydoc.info/gems/loofah/
280
199
  changelog_uri: https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md
281
- source_code_uri: https://github.com/flavorjones/loofah
200
+ documentation_uri: https://www.rubydoc.info/gems/loofah/
282
201
  post_install_message:
283
- rdoc_options:
284
- - "--main"
285
- - README.md
202
+ rdoc_options: []
286
203
  require_paths:
287
204
  - lib
288
205
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -296,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
213
  - !ruby/object:Gem::Version
297
214
  version: '0'
298
215
  requirements: []
299
- rubygems_version: 3.1.2
216
+ rubygems_version: 3.1.4
300
217
  signing_key:
301
218
  specification_version: 4
302
219
  summary: Loofah is a general library for manipulating and transforming HTML/XML documents
data/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`.
4
-
5
- source "https://rubygems.org/"
6
-
7
- gem "nokogiri", ">=1.5.9"
8
- gem "crass", "~>1.0.2"
9
-
10
- gem "rake", "~>12.3", :group => [:development, :test]
11
- gem "minitest", "~>2.2", :group => [:development, :test]
12
- gem "rr", "~>1.2.0", :group => [:development, :test]
13
- gem "json", "~>2.3.0", :group => [:development, :test]
14
- gem "hoe-gemspec", "~>1.0", :group => [:development, :test]
15
- gem "hoe-debugging", "~>2.0", :group => [:development, :test]
16
- gem "hoe-bundler", "~>1.5", :group => [:development, :test]
17
- gem "hoe-git", "~>1.6", :group => [:development, :test]
18
- gem "hoe-markdown", "~>1.2", :group => [:development, :test]
19
- gem "concourse", ">=0.26.0", :group => [:development, :test]
20
- gem "rubocop", ">=0.76.0", :group => [:development, :test]
21
- gem "rdoc", ">=4.0", "<7", :group => [:development, :test]
22
- gem "hoe", "~>3.22", :group => [:development, :test]
23
-
24
- # vim: syntax=ruby
@@ -1,25 +0,0 @@
1
- CHANGELOG.md
2
- Gemfile
3
- MIT-LICENSE.txt
4
- Manifest.txt
5
- README.md
6
- Rakefile
7
- SECURITY.md
8
- benchmark/benchmark.rb
9
- benchmark/fragment.html
10
- benchmark/helper.rb
11
- benchmark/www.slashdot.com.html
12
- lib/loofah.rb
13
- lib/loofah/elements.rb
14
- lib/loofah/helpers.rb
15
- lib/loofah/html/document.rb
16
- lib/loofah/html/document_fragment.rb
17
- lib/loofah/html5/libxml2_workarounds.rb
18
- lib/loofah/html5/safelist.rb
19
- lib/loofah/html5/scrub.rb
20
- lib/loofah/instance_methods.rb
21
- lib/loofah/metahelpers.rb
22
- lib/loofah/scrubber.rb
23
- lib/loofah/scrubbers.rb
24
- lib/loofah/xml/document.rb
25
- lib/loofah/xml/document_fragment.rb
data/Rakefile DELETED
@@ -1,97 +0,0 @@
1
- require "rubygems"
2
- require "hoe"
3
- require "concourse"
4
-
5
- Hoe.plugin :git
6
- Hoe.plugin :gemspec
7
- Hoe.plugin :bundler
8
- Hoe.plugin :debugging
9
- Hoe.plugin :markdown
10
-
11
- Hoe.spec "loofah" do
12
- developer "Mike Dalessio", "mike.dalessio@gmail.com"
13
- developer "Bryan Helmkamp", "bryan@brynary.com"
14
-
15
- self.license "MIT"
16
- self.urls = {
17
- "home" => "https://github.com/flavorjones/loofah",
18
- "bugs" => "https://github.com/flavorjones/loofah/issues",
19
- "doco" => "https://www.rubydoc.info/gems/loofah/",
20
- "clog" => "https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md",
21
- "code" => "https://github.com/flavorjones/loofah",
22
- }
23
-
24
- extra_deps << ["nokogiri", ">=1.5.9"]
25
- extra_deps << ["crass", "~> 1.0.2"]
26
-
27
- extra_dev_deps << ["rake", "~> 12.3"]
28
- extra_dev_deps << ["minitest", "~>2.2"]
29
- extra_dev_deps << ["rr", "~>1.2.0"]
30
- extra_dev_deps << ["json", "~> 2.3.0"]
31
- extra_dev_deps << ["hoe-gemspec", "~> 1.0"]
32
- extra_dev_deps << ["hoe-debugging", "~> 2.0"]
33
- extra_dev_deps << ["hoe-bundler", "~> 1.5"]
34
- extra_dev_deps << ["hoe-git", "~> 1.6"]
35
- extra_dev_deps << ["hoe-markdown", "~> 1.2"]
36
- extra_dev_deps << ["concourse", ">=0.26.0"]
37
- extra_dev_deps << ["rubocop", ">=0.76.0"]
38
- end
39
-
40
- task :gemspec do
41
- system %q(rake debug_gem | grep -v "^\(in " > loofah.gemspec)
42
- end
43
-
44
- task :redocs => :fix_css
45
- task :docs => :fix_css
46
- task :fix_css do
47
- better_css = <<-EOT
48
- .method-description pre {
49
- margin : 1em 0 ;
50
- }
51
-
52
- .method-description ul {
53
- padding : .5em 0 .5em 2em ;
54
- }
55
-
56
- .method-description p {
57
- margin-top : .5em ;
58
- }
59
-
60
- #main ul, div#documentation ul {
61
- list-style-type : disc ! IMPORTANT ;
62
- list-style-position : inside ! IMPORTANT ;
63
- }
64
-
65
- h2 + ul {
66
- margin-top : 1em;
67
- }
68
- EOT
69
- puts "* fixing css"
70
- File.open("doc/rdoc.css", "a") { |f| f.write better_css }
71
- end
72
-
73
- desc "generate and upload docs to rubyforge"
74
- task :doc_upload_to_rubyforge => :docs do
75
- Dir.chdir "doc" do
76
- system "rsync -avz --delete * rubyforge.org:/var/www/gforge-projects/loofah/loofah"
77
- end
78
- end
79
-
80
- desc "generate safelists from W3C specifications"
81
- task :generate_safelists do
82
- load "tasks/generate-safelists"
83
- end
84
-
85
- task :rubocop => [:rubocop_security, :rubocop_frozen_string_literals]
86
- task :rubocop_security do
87
- sh "rubocop lib --only Security"
88
- end
89
- task :rubocop_frozen_string_literals do
90
- sh "rubocop lib --auto-correct --only Style/FrozenStringLiteralComment"
91
- end
92
- Rake::Task[:test].prerequisites << :rubocop
93
-
94
- Concourse.new("loofah", fly_target: "ci") do |c|
95
- c.add_pipeline "loofah", "loofah.yml"
96
- c.add_pipeline "loofah-pr", "loofah-pr.yml"
97
- end