sanitize 6.0.2 → 6.1.1

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: 93adca1e155370d138ccb7c500b618e2ed218297d21593ec8937638f4d99731b
4
- data.tar.gz: 740b6d84113a0945928601b6cad03e36b4ee76f7c3098c72ddb1a1b01ec5d0ec
3
+ metadata.gz: ed64268ea99d49841046ad5977df0d4e622abe58a6374244bc9223631ee0ed95
4
+ data.tar.gz: eb614786ac3167798532bdfef07c2abd65d5a72928af487432c775d9c878024d
5
5
  SHA512:
6
- metadata.gz: 4d3e9852ec92ac961c2e35d4a04e7d967dd2eac364e656837b93daf95c1b653da53d4ef7f104af83887e46d08237ddca1efa945facde3efbfcfce0164c0fe334
7
- data.tar.gz: 05a56334e5cdbbee7b165b19245b90a8acdd82bcd72bbc9f84e2780d914f8b040d19d9ff71934b0c1bd71df4b55f407f460c76dffdbd275b183ecaffb2fa6c38
6
+ metadata.gz: 176c443206f2880a84bca7d84a32a631e4237f5f3de4d69f45a9dcd80ba31999c7c7424c1ace1a09aa4566834a699e7ff149e956383ec91c2c98e7c63c01f3c6
7
+ data.tar.gz: f492268ae71a8109b4857f9dced29d3ed4e3897b39fe2cb4d12cd1459395b58197179b2e9cdd32175e281a5aea04a13fa741809040289dbe47391b7367e1397d
data/HISTORY.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Sanitize History
2
2
 
3
+ ## 6.1.1 (2024-06-12)
4
+
5
+ ### Bug Fixes
6
+
7
+ * Proactively fixed a compatibility issue with libxml >= 2.13.0 (which will be used in an upcoming version of Nokogiri) that caused HTML doctype sanitization to fail. [@flavorjones - #238][238]
8
+
9
+ [238]:https://github.com/rgrove/sanitize/pull/238
10
+
11
+ ## 6.1.0 (2023-09-14)
12
+
13
+ ### Features
14
+
15
+ * Added the `text-decoration-skip-ink` and `text-decoration-thickness` CSS properties to the relaxed config. [@martineriksson - #228][228]
16
+
17
+ [228]:https://github.com/rgrove/sanitize/pull/228
18
+
3
19
  ## 6.0.2 (2023-07-06)
4
20
 
5
21
  ### Bug Fixes
data/README.md CHANGED
@@ -118,11 +118,10 @@ Sanitize.document(html,
118
118
  :elements => ['html']
119
119
  )
120
120
  # => %[
121
- # <!DOCTYPE html>
122
- # <html>foo
121
+ # <!DOCTYPE html><html>foo
123
122
  #
124
- # </html>
125
- # ]
123
+ # </html>
124
+ # ]
126
125
  ```
127
126
 
128
127
  ### CSS in HTML
@@ -666,7 +666,9 @@ class Sanitize
666
666
  text-decoration-color
667
667
  text-decoration-line
668
668
  text-decoration-skip
669
+ text-decoration-skip-ink
669
670
  text-decoration-style
671
+ text-decoration-thickness
670
672
  text-emphasis
671
673
  text-emphasis-color
672
674
  text-emphasis-position
@@ -9,7 +9,11 @@ class Sanitize; module Transformers
9
9
 
10
10
  if node.type == Nokogiri::XML::Node::DTD_NODE
11
11
  if env[:config][:allow_doctype]
12
- node.name = 'html'
12
+ if node.name != "html"
13
+ document = node.document
14
+ node.unlink
15
+ document.create_internal_subset("html", nil, nil)
16
+ end
13
17
  else
14
18
  node.unlink
15
19
  end
@@ -1,3 +1,3 @@
1
1
  class Sanitize
2
- VERSION = '6.0.2'
2
+ VERSION = '6.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanitize
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Grove
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-06 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: crass
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 5.14.4
47
+ version: '5.15'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 5.14.4
54
+ version: '5.15'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -105,7 +105,9 @@ files:
105
105
  homepage: https://github.com/rgrove/sanitize/
106
106
  licenses:
107
107
  - MIT
108
- metadata: {}
108
+ metadata:
109
+ changelog_uri: https://github.com/rgrove/sanitize/blob/main/HISTORY.md
110
+ documentation_uri: https://rubydoc.info/github/rgrove/sanitize
109
111
  post_install_message:
110
112
  rdoc_options: []
111
113
  require_paths:
@@ -121,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  - !ruby/object:Gem::Version
122
124
  version: 1.2.0
123
125
  requirements: []
124
- rubygems_version: 3.4.10
126
+ rubygems_version: 3.5.11
125
127
  signing_key:
126
128
  specification_version: 4
127
129
  summary: Allowlist-based HTML and CSS sanitizer.