You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Changelog
2
2
3
+
## Unreleased - Fix for Issue #565
4
+
5
+
- Upgrades `htmlparser2` to new major version `^8.0.0`.
6
+
3
7
## 2.7.3 (2022-10-24)
4
8
5
9
- If allowedTags is falsy but not exactly `false`, then do not assume that all tags are allowed. Rather, allow no tags in this case, to be on the safe side. This matches the existing documentation and fixes [issue #176](https://github.com/apostrophecms/sanitize-html/issues/176). Thanks to [Kedar Chandrayan](https://github.com/kedarchandrayan) for the fix.
it('should dump closing tags which do not have any opening tags.',function(){
140
140
assert.equal(sanitizeHtml('<b><div/',{
141
141
allowedTags: ['b']
142
-
}),'<b></b>');
142
+
}),'<b>/</b>');
143
143
144
144
assert.equal(sanitizeHtml('<b><b<<div/',{
145
145
allowedTags: ['b']
146
-
}),'<b></b>');
146
+
}),'<b>/</b>');
147
147
});
148
148
it('should tolerate not closed p tags',function(){
149
149
assert.equal(sanitizeHtml('<div><p>inner text 1<p>inner text 2<p>inner text 3</div>'),'<div><p>inner text 1</p><p>inner text 2</p><p>inner text 3</p></div>');
0 commit comments