Skip to content

Commit 8ea2500

Browse files
committed
doc: update CHANGELOG
1 parent 7f485d6 commit 8ea2500

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

CHANGELOG.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
11
## next / unreleased
22

3-
* `SafeListSanitizer` allows `time` tag and `lang` attribute by default.
3+
* Sanitizers that use an HTML5 parser are now available on platforms supported by
4+
Nokogiri::HTML5. These are available as:
5+
6+
- `Rails::HTML5::FullSanitizer`
7+
- `Rails::HTML5::LinkSanitizer`
8+
- `Rails::HTML5::SafeListSanitizer`
9+
10+
And a new "vendor" is provided at `Rails::HTML5::Sanitizer` that can be used in a future version
11+
of Rails.
12+
13+
Note that for symmetry `Rails::HTML4::Sanitizer` is also added, though its behavior is identical
14+
to the vendor class methods on `Rails::HTML::Sanitizer`.
415

516
*Mike Dalessio*
617

7-
* `Rails::Html::XPATHS_TO_REMOVE` has been removed. It's not necessary with the existing sanitizers,
8-
and should have been a private constant all along anyway.
18+
* Module namespaces have changed, but backwards compatibility is provided by aliases.
19+
20+
The library defines three additional modules:
21+
22+
- `Rails::HTML` for general functionality (replacing `Rails::Html`)
23+
- `Rails::HTML4` containing sanitizers that parse content as HTML4
24+
- `Rails::HTML5` containing sanitizers that parse content as HTML5
25+
26+
The following aliases are maintained for backwards compatibility:
27+
28+
- `Rails::Html` points to `Rails::HTML`
29+
- `Rails::HTML::FullSanitizer` points to `Rails::HTML4::FullSanitizer`
30+
- `Rails::HTML::LinkSanitizer` points to `Rails::HTML4::LinkSanitizer`
31+
- `Rails::HTML::SafeListSanitizer` points to `Rails::HTML4::SafeListSanitizer`
932

1033
*Mike Dalessio*
1134

12-
* `Rails::Html` has been renamed to `Rails::HTML`, but this module is aliased to `Rails::Html` for
13-
backwards compatibility.
35+
* `SafeListSanitizer` allows `time` tag and `lang` attribute by default.
36+
37+
*Mike Dalessio*
38+
39+
* `Rails::Html::XPATHS_TO_REMOVE` has been removed. It's not necessary with the existing sanitizers,
40+
and should have been a private constant all along anyway.
1441

1542
*Mike Dalessio*
1643

@@ -24,6 +51,7 @@
2451

2552
*seyerian*
2653

54+
2755
## 1.4.4 / 2022-12-13
2856

2957
* Address inefficient regular expression complexity with certain configurations of Rails::Html::Sanitizer.
@@ -69,6 +97,7 @@
6997

7098
*Mike Dalessio*
7199

100+
72101
## 1.4.2 / 2021-08-23
73102

74103
* Slightly improve performance.
@@ -77,6 +106,7 @@
77106

78107
*Mike Dalessio*
79108

109+
80110
## 1.4.1 / 2021-08-18
81111

82112
* Fix regression in v1.4.0 that did not pass comment nodes to the scrubber.
@@ -89,6 +119,7 @@
89119

90120
*Mike Dalessio*
91121

122+
92123
## 1.4.0 / 2021-08-18
93124

94125
* Processing Instructions are no longer allowed by Rails::Html::PermitScrubber
@@ -101,12 +132,14 @@
101132

102133
*Mike Dalessio*
103134

135+
104136
## 1.3.0
105137

106138
* Address deprecations in Loofah 2.3.0.
107139

108140
*Josh Goodall*
109141

142+
110143
## 1.2.0
111144

112145
* Remove needless `white_list_sanitizer` deprecation.
@@ -121,6 +154,7 @@
121154

122155
*Kasper Timm Hansen*
123156

157+
124158
## 1.1.0
125159

126160
* Add `safe_list_sanitizer` and deprecate `white_list_sanitizer` to be removed
@@ -138,10 +172,12 @@
138172

139173
*Kasper Timm Hansen*
140174

175+
141176
## 1.0.1
142177

143178
* Added support for Rails 4.2.0.beta2 and above
144179

180+
145181
## 1.0.0
146182

147183
* First release.

0 commit comments

Comments
 (0)