Caught by the fuzz! jsoup 1.14.2 is out now, and includes a set of parser bug fixes and improvements for handling rough HTML and XML, as identified by the Jazzer JVM fuzzer. This release also includes other fixes and improvements.
jsoup 1.14.1 is out now, with simple request session management, increased parse robustness, and a ton of other improvements, speed-ups, and bug fixes.
See the full announcement for all the details on what's changed.
Improvement: added the ability to track the position (line, column, index) in the original input source from where
a given node was parsed. Accessible via Node.sourceRange() and Element.endSourceRange().
jhy/jsoup#1790
Improvement: added Element.firstElementChild(), Element.lastElementChild(), Node.firstChild(), Node.lastChild(),
as convenient accessors to those child nodes and elements.
Improvement: added Element.expectFirst(cssQuery), which is just like Element.selectFirst(), but instead of returning
a null if there is no match, will throw an IllegalArgumentException. This is useful if you want to simply abort
processing if an expected match is not found.
Improvement: when pretty-printing HTML, doctypes are emitted on a newline if there is a preceeding comment.
jhy/jsoup#1664
Bugfix: when using the readToByteBuffer method, such as in Connection.Response.body(), if the document has not
already been parsed and must be read fully, and there is any maximum buffer size being applied, only the default
internal buffer size is read.
jhy/jsoup#1774
Bugfix: when serializing HTML, newlines in elements descending from a pre tag were incorrectly skipped. That caused
what should have been preformatted output to instead be a run of text.
jhy/jsoup#1776
Bugfix: when pretty-print serializing HTML, newlines separating phrasing content (e.g. a tag within a tag
would be incorrectly skipped, instead of normalized to a space. Additionally, improved space normalization between
other end of line occurences, and whitespace handling after a closing
jhy/jsoup#1787
*** Release 1.15.1 [2022-May-15]
Change: removed previously deprecated methods and classes (including org.jsoup.safety.Whitelist; use
org.jsoup.safety.Safelist instead).
Improvement: when converting jsoup Documents to W3C Documents in W3CDom, preserve HTML valid attribute names if the
input document is using the HTML syntax. (Previously, would always coerce using the more restrictive XML syntax.)
jhy/jsoup#1648
Improvement: added the :containsWholeText(text) selector, to match against non-normalized Element text. That can be
useful when elements can only be distinguished by e.g. specific case, or leading whitespace, etc.
jhy/jsoup#1636
Improvement: added Element#wholeOwnText() to retrieve the original (non-normalized) ownText of an Element. Also
added the :containsWholeOwnText(text) selector, to match against that. BR elements are now treated as newlines
in the wholeText methods.
jhy/jsoup#1636
Improvement: added the :matchesWholeText(regex) and :matchesWholeOwnText(regex) selectors, to match against whole
(non-normalized, case sensitive) element text and own text, respectively.
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/Azure/spring-cloud-azure-tools/network/alerts).
Bumps jsoup from 1.13.1 to 1.14.2.
Release notes
Sourced from jsoup's releases.
Changelog
Sourced from jsoup's changelog.
... (truncated)
Commits
19c7732
[maven-release-plugin] prepare release jsoup-1.14.2acde180
Compress harder530c5b0
Refactored fuzz tests to iterate all files in directory; run timeout testsd2c455c
Speed improvement: cap number of cloned active formatting elements0dcb53a
Correctly consume to exit state42da864
In bogusComment, make sure unconsume not called after a potential buffer upeba3e39
Fix an IOOB when HTML root cleared and then attributes added9d538e6
Annotate some nullablesa909600
Comment on URL normalization6b3ec64
Removed unused importDependabot 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/Azure/spring-cloud-azure-tools/network/alerts).