Added a :parser_options config hash, which makes it possible to pass custom parsing options to Nokogumbo. [@austin-wang - #194]194
Bug Fixes
Non-characters and non-whitespace control characters are now stripped from HTML input before parsing to comply with the HTML Standard's preprocessing guidelines. Prior to this Sanitize had adhered to older W3C guidelines that have since been withdrawn. #179179
v5.0.0
For most users, upgrading from 4.x shouldn't require any changes. However, the minimum required Ruby version has changed, and Sanitize 5.x's HTML output may differ in some small ways from 4.x's output. If this matters to you, please review the changes below carefully.
Potentially Breaking Changes
Ruby 2.3.0 is now the oldest officially supported Ruby version. Sanitize may work in older 2.x Rubies, but they aren't actively tested. Sanitize definitely no longer works in Ruby 1.9.x.
Upgraded to Nokogumbo 2.x, which fixes various bugs and adds standard-compliant HTML serialization. [@stevecheckoway - #189]189
Children of the following elements are now removed by default when these elements are removed, rather than being preserved and escaped:
iframe
noembed
noframes
noscript
script
style
Children of whitelisted iframe elements are now always removed. In modern HTML, iframe elements should never have children. In HTML 4 and earlier iframe elements were allowed to contain fallback content for legacy browsers, but it's been almost two decades since that was useful.
Fixed a bug that caused :remove_contents to behave as if it were set to true when it was actually an Array.
v4.6.6
Improved performance and memory usage by optimizing Sanitize#transform_node! [@stanhu - #183]183
v4.6.5
Improved performance slightly by tweaking the order of built-in transformers. [@rafbm - #180]180
4.6.4 (2018-03-20)
Fixed: A change introduced in 4.6.2 broke certain transformers that relied on being able to mutate the name of an HTML node. That change has been reverted and a test has been added to cover this case. [@zetter - #177][177]
Added a :parser_options config hash, which makes it possible to pass custom
parsing options to Nokogumbo. [@austin-wang - #194]194
Bug Fixes
Non-characters and non-whitespace control characters are now stripped from
HTML input before parsing to comply with the HTML Standard's preprocessing
guidelines. Prior to this Sanitize had adhered to older
W3C guidelines that have since been withdrawn. #179179
5.0.0 (2018-10-14)
For most users, upgrading from 4.x shouldn't require any changes. However, the
minimum required Ruby version has changed, and Sanitize 5.x's HTML output may
differ in some small ways from 4.x's output. If this matters to you, please
review the changes below carefully.
Potentially Breaking Changes
Ruby 2.3.0 is now the oldest officially supported Ruby version. Sanitize may
work in older 2.x Rubies, but they aren't actively tested. Sanitize definitely
no longer works in Ruby 1.9.x.
Upgraded to Nokogumbo 2.x, which fixes various bugs and adds
standard-compliant HTML serialization. [@stevecheckoway - #189][189]
Children of the following elements are now removed by default when these
elements are removed, rather than being preserved and escaped:
iframe
noembed
noframes
noscript
script
style
Children of whitelisted iframe elements are now always removed. In modern
HTML, iframe elements should never have children. In HTML 4 and earlier
iframe elements were allowed to contain fallback content for legacy
browsers, but it's been almost two decades since that was useful.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/jarrett/rbbcode/network/alerts).
Bumps sanitize from 4.5.0 to 5.1.0.
Release notes
Sourced from sanitize's releases.
Changelog
Sourced from sanitize's changelog.
Commits
245c705
Release 5.1.00d4158f
Strip control characters and non-characters before parsing18b872e
Fix keyword parameter warnings in Ruby 2.7.0-devd692087
Support parser options when parsing documentsb48f686
Avoid stubbing instance methods in testseba39a9
Style6fd16a6
Add :parser_options config option935eb9d
chore: Create SECURITY.mddd46691
fix: Unbreak tests when using Nokogiri 1.10.2424f02f
Release 5.0.0Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/jarrett/rbbcode/network/alerts).