-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f0d550
commit b410a9d
Showing
4 changed files
with
70 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
WIP | ||
|
||
## [4.0.0] - 2020-04-21 | ||
|
||
### Changed | ||
|
||
#### Breaking changes | ||
|
||
- Function `sanitizeHtml` now returns a HTML string instead of a DOM node snapshot. | ||
- Arguments for filter functions changed from `node, parents, parentNodeNames` to | ||
`node, { parents, parentNodeNames }`. | ||
|
||
#### Other changes | ||
|
||
- Changed the default value of option `remove_tags_deep` from `{ '.*': ['style', 'script', | ||
'textarea', 'noscript'] }` to `{}`. | ||
- Repository organization: Extraction of library functions into separate files. | ||
- Code style improvements using `eslint`. | ||
- Performance: Regular expressions in options are now precompiled. | ||
- Testing: Change to ES6 module format. | ||
- Testing: Use Node's built-in function `assert`. | ||
- Testing: Support for browsers as well as Node.js. | ||
- Testing: Switch from Jenkins to Github actions. | ||
|
||
### Removed | ||
|
||
#### Breaking | ||
|
||
- Function `sanitizeDom` is no longer exported. It's internal use only. Use instead its wrappers | ||
`sanitizeNode`, `sanitizeChildNodes`, and `sanitizeHtml`. | ||
- Removed recognition of the custom DOM Node properties `sanitize_skip_filters`, `sanitize_skip`, | ||
`sanitize_skip_filter_classes`, and `sanitize_skip_filter_attributes`. These are now stored in a | ||
`WeakMap` without their `sanitize_` prefix. See `README` for more information. | ||
- Regular expression matching of node names removed wrapping between `^` and `$` to increase flexibility. | ||
|
||
### Added | ||
|
||
- Added new option `allowed_empty_tags` to provide exceptions when `options.remove_empty` is set. | ||
- Added argument `siblingIndex` to filter functions. | ||
- Case-insensitive matching of tag names given in options. | ||
|
||
### Fixed | ||
|
||
- Filtering of attributes was broken (it operated on a live node set instead of a snapshot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters