Debian Codegraph @

CHANGES

raw
1 jsoup changelog
2
3 Release 1.15.3 [2022-Aug-24]
4 * Security: fixed an issue where the jsoup cleaner may incorrectly sanitize crafted XSS attempts if
5 SafeList.preserveRelativeLinks is enabled.
6 <https://github.com/jhy/jsoup/security/advisories/GHSA-gp7f-rwcx-9369>
7
8 * Improvement: the Cleaner will preserve the source position of cleaned elements, if source tracking is enabled in the
9 original parse.
10
11 * Improvement: the error messages output from Validate are more descriptive. Exceptions are now ValidationExceptions
12 (extending IllegalArgumentException). Stack traces do not include the Validate class, to make it simpler to see
13 where the exception originated. Common validation errors including malformed URLs and empty selector results have
14 more explicit error messages.
15
16 * Bugfix: the DataUtil would incorrectly read from InputStreams that emitted reads less than the requested size. This
17 lead to incorrect results when parsing from chunked server responses, for e.g.
18 <https://github.com/jhy/jsoup/issues/1807>
19
20 * Build Improvement: added implementation version and related fields to the jar manifest.
21 <https://github.com/jhy/jsoup/issues/1809>
22
23 *** Release 1.15.2 [2022-Jul-04]
24 * Improvement: added the ability to track the position (line, column, index) in the original input source from where
25 a given node was parsed. Accessible via Node.sourceRange() and Element.endSourceRange().
26 <https://github.com/jhy/jsoup/pull/1790>
27
28 * Improvement: added Element.firstElementChild(), Element.lastElementChild(), Node.firstChild(), Node.lastChild(),
29 as convenient accessors to those child nodes and elements.
30
31 * Improvement: added Element.expectFirst(cssQuery), which is just like Element.selectFirst(), but instead of returning
32 a null if there is no match, will throw an IllegalArgumentException. This is useful if you want to simply abort
33 processing if an expected match is not found.
34
35 * Improvement: when pretty-printing HTML, doctypes are emitted on a newline if there is a preceding comment.
36 <https://github.com/jhy/jsoup/pull/1664>
37
38 * Improvement: when pretty-printing, trim the leading and trailing spaces of textnodes in block tags when possible,
39 so that they are indented correctly.
40 <https://github.com/jhy/jsoup/issues/1798>
41
42 * Improvement: in Element#selectXpath(), disable namespace awareness. This makes it possible to always select elements
43 by their simple local name, regardless of whether an xmlns attribute was set.
44 <https://github.com/jhy/jsoup/issues/1801>
45
46 * Bugfix: when using the readToByteBuffer method, such as in Connection.Response.body(), if the document has not
47 already been parsed and must be read fully, and there is any maximum buffer size being applied, only the default
48 internal buffer size is read.
49 <https://github.com/jhy/jsoup/issues/1774>
50
51 * Bugfix: when serializing HTML, newlines in elements descending from a pre tag were incorrectly skipped. That caused
52 what should have been preformatted output to instead be a run of text.
53 <https://github.com/jhy/jsoup/issues/1776>
54
55 * Bugfix: when pretty-print serializing HTML, newlines separating phrasing content (e.g. a <span> tag within a <p> tag
56 would be incorrectly skipped, instead of normalized to a space. Additionally, improved space normalization between
57 other end of line occurences, and whitespace handling after a closing </body>
58 <https://github.com/jhy/jsoup/issues/1787>
59
60 *** Release 1.15.1 [2022-May-15]
61 * Change: removed previously deprecated methods and classes (including org.jsoup.safety.Whitelist; use
62 org.jsoup.safety.Safelist instead).
63
64 * Improvement: when converting jsoup Documents to W3C Documents in W3CDom, preserve HTML valid attribute names if the
65 input document is using the HTML syntax. (Previously, would always coerce using the more restrictive XML syntax.)
66 <https://github.com/jhy/jsoup/pull/1648>
67
68 * Improvement: added the :containsWholeText(text) selector, to match against non-normalized Element text. That can be
69 useful when elements can only be distinguished by e.g. specific case, or leading whitespace, etc.
70 <https://github.com/jhy/jsoup/issues/1636>
71
72 * Improvement: added Element#wholeOwnText() to retrieve the original (non-normalized) ownText of an Element. Also
73 added the :containsWholeOwnText(text) selector, to match against that. BR elements are now treated as newlines
74 in the wholeText methods.
75 <https://github.com/jhy/jsoup/issues/1636>
76
77 * Improvement: added the :matchesWholeText(regex) and :matchesWholeOwnText(regex) selectors, to match against whole
78 (non-normalized, case sensitive) element text and own text, respectively.
79 <https://github.com/jhy/jsoup/issues/1636>
80
81 * Improvement: when evaluating an XPath query against a context element, the complete document is now visible to the
82 query, vs only the context element's sub-tree. This enables support for queries outside (parent or sibling) the
83 element, e.g. ancestor-or-self::*.
84 <https://github.com/jhy/jsoup/issues/1652>
85
86 * Improvement: allow a maxPaddingWidth on the indent level in OutputSettings when pretty printing. This defaults to
87 30 to limit the indent level for very deeply nested elements, and may be disabled by setting to -1.
88 <https://github.com/jhy/jsoup/pull/1655>
89
90 * Improvement: when cloning a Node or an Element, the clone gets a cloned OwnerDocument containing only that clone, so
91 as to preserve applicable settings, such as the Pretty Print settings.
92 <https://github.com/jhy/jsoup/issues/763>
93
94 * Improvement: added a convenience method Jsoup.parse(File).
95 <https://github.com/jhy/jsoup/issues/1693>
96
97 * Improvement: in the NodeTraversor, added default implementations for NodeVisitor.tail() and NodeFilter.tail(), so
98 that code using only head() methods can be written as lambdas.
99
100 * Improvement: in NodeTraversor, added support for removing nodes via Node.remove() during NodeVisitor.head().
101 <https://github.com/jhy/jsoup/issues/1699>
102
103 * Improvement: added Node.forEachNode(Consumer<Node>) and Element.forEach(Consumer<Element) methods, to efficiently
104 traverse the DOM with a functional interface.
105 <https://github.com/jhy/jsoup/issues/1700>
106
107 * Bugfix: boolean attribute names should be case-insensitive, but were not when the parser was configured to preserve
108 case.
109 <https://github.com/jhy/jsoup/issues/1656>
110
111 * Bugfix: when reading from SequenceInputStreams across the buffer, the input stream was closed too early, resulting
112 in missed content.
113 <https://github.com/jhy/jsoup/pull/1671>
114
115 * Bugfix: a comment with all dashes (<!----->) should not emit a parse error.
116 <https://github.com/jhy/jsoup/issues/1667>
117
118 * Bugfix: when throwing a SelectorParseException for an invalid selector, don't try to String.format the input, as
119 that could throw an IllegalFormatException.
120 <https://github.com/jhy/jsoup/issues/1691>
121
122 * Bugfix: when serializing HTML with Pretty Print enabled, extraneous whitespace may be added on closing tags, or
123 extra newlines may be added at the end of script blocks.
124 <https://github.com/jhy/jsoup/issues/1688>
125 <https://github.com/jhy/jsoup/issues/1689>
126
127 * Bugfix: when copy-creating a Safelist from another, perform a deep-copy of the original's settings, so that changes
128 to the original after creation do not affect the copy.
129 <https://github.com/jhy/jsoup/pull/1763>
130
131 * Bugfix [Fuzz]: speed improvement when parsing constructed HTML containing very deeply incorrectly stacked formatting
132 elements with many attributes.
133 <https://github.com/jhy/jsoup/issues/1695>
134
135 * Bugfix [Fuzz]: during parsing, a StackOverflowException was possible given crafted HTML with hundreds of nested
136 table elements followed by invalid formatting elements.
137 <https://github.com/jhy/jsoup/issues/1697>
138
139 *** Release 1.14.3 [2021-Sep-30]
140 * Improvement: added native XPath support in Element#selectXpath(String)
141 <https://github.com/jhy/jsoup/pull/1629>
142
143 * Improvement: added full support for the <template> tag to the HTML5 parser spec.
144 <https://github.com/jhy/jsoup/issues/1634>
145
146 * Improvement: added support in CharacterReader to track newlines, so that parse errors can be reported more
147 intuitively.
148 <https://github.com/jhy/jsoup/pull/1624>
149
150 * Improvement: tracked parse errors now have more details, including the erroneous token, to help clarify the errors.
151
152 * Improvement: speed and memory optimizations for the :has(subquery) selector.
153
154 * Improvement: the :contains(text) and :containsOwn(text) selectors are now whitespace normalized, aligning to the
155 document text that they are matching against.
156 <https://github.com/jhy/jsoup/issues/876>
157
158 * Improvement: in Element, speed optimized adopting all of an element's child nodes into a currently empty element.
159 Improves the HTML adoption agency algorithm when adopting elements with many children.
160 <https://github.com/jhy/jsoup/issues/1638>
161
162 * Improvement: increased the parse speed when in RCData (e.g. <title>) and unescaped <tag> tokens are found, by
163 memoizing the </title> scan and reducing GC.
164 <https://github.com/jhy/jsoup/issues/1644>
165
166 * Improvement: when parsing custom tags (in HTML or XML), added a flyweight cache on Tag.valueOf(name) to reduce
167 memory overhead when many tags are repeated. Also tuned other areas of the parser when many very deeply stacked
168 custom elements were present.
169 <https://github.com/jhy/jsoup/issues/1646>
170
171 * Bugfix: when tracking errors or checking for validity in the Cleaner, errors were incorrectly raised for missing
172 optional closing tags.
173
174 * Bugfix: the OSGi bundle meta-data incorrectly set a version on the import of javax.annotation (used as a build-time
175 dependency for nullability assertions).
176 <https://github.com/jhy/jsoup/issues/1616>
177
178 * Bugfix: the Attributes::equals() method was sensitive to the order of its contents, but it should not be.
179 <https://github.com/jhy/jsoup/issues/1492>
180
181 * Bugfix: when the HTML parser was configured to preserve case, Element text methods would miss adding whitespace for
182 "BR" tags.
183
184 * Bugfix: attribute names are now normalized & validated correctly for the specific output syntax (HTML or XML).
185 Previously, syntactically invalid attribute names could be output by the html() methods. Such attributes are still
186 available in the DOM, and will be normalized if possible on output.
187 <https://github.com/jhy/jsoup/issues/1474>
188
189 * Bugfix [Fuzz]: fixed an IOOB when an empty select tag was followed by a body tag that needed reparenting.
190 <https://github.com/jhy/jsoup/issues/1639>
191
192 * Build Improvement: fixed nullability annotations for Node.equals(other) and other equals methods.
193 <https://github.com/jhy/jsoup/issues/1628>
194
195 * Build Improvement: added JDK 17 to the CI builds.
196 <https://github.com/jhy/jsoup/pull/1641>
197
198 *** Release 1.14.2 [2021-Aug-15]
199 * Improvement: support Pattern.quote \Q and \E escapes in the selector regex matchers.
200 <https://github.com/jhy/jsoup/pull/1536>
201
202 * Improvement: Element.absUrl() now supports tel: URLs, and other URLs that are already absolute but that Java does
203 not have input stream handlers for.
204 <https://github.com/jhy/jsoup/issues/1610>
205
206 * Bugfix: when serializing output, escape characters that are in the < 0x20 range. This improves XML output
207 compatibility, and makes HTML output with these characters easier to read (as they're otherwise invisible).
208 <https://github.com/jhy/jsoup/issues/1556>
209
210 * Bugfix: the *|el wildcard namespace selector now also matches elements with no namespace.
211 <https://github.com/jhy/jsoup/issues/1565>
212
213 * Bugfix: corrected a potential case of the parser input stream not being closed immediately on a read exception.
214
215 * Bugfix: when making a HTTP POST, if the request write fails, make sure the connection is immediately cleaned up.
216
217 * Bugfix: in the XML parser, XML processing instructions without attributes would be serialized as if they did.
218 <https://github.com/jhy/jsoup/issues/770>
219
220 * Bugfix: updated the HtmlTreeParser resetInsertionMode to the current spec for supported elements.
221 <https://github.com/jhy/jsoup/issues/1491>
222
223 * Bugfix: fixed an NPE when parsing fragment HTML into a standalone table element.
224 <https://github.com/jhy/jsoup/issues/1603>
225
226 * Bugfix: fixed an NPE when parsing fragment heading HTML into a standalone p element.
227 <https://github.com/jhy/jsoup/issues/1601>
228
229 * Bugfix: fixed an IOOB when parsing a formatting fragment into a standalone p element.
230 <https://github.com/jhy/jsoup/issues/1602>
231
232 * Bugfix: tag names must start with an ascii-alpha character.
233 <https://github.com/jhy/jsoup/issues/1006>
234
235 * Bugfix [Fuzz]: fixed a slow parse when a tag or an attribute name has thousands of null characters in it.
236 <https://github.com/jhy/jsoup/issues/1580>
237
238 * Bugfix [Fuzz]: the adoption agency algorithm can have an incorrect bookmark position
239 <https://github.com/jhy/jsoup/issues/1576>
240
241 * Bugfix [Fuzz]: malformed HTML could result in null elements on stack
242 <https://github.com/jhy/jsoup/issues/1579>
243
244 * Bugfix [Fuzz]: malformed deeply nested table elements could create a stack overflow.
245 <https://github.com/jhy/jsoup/issues/1577>
246
247 * Bugfix [Fuzz]: Speed optimized malformed HTML creating elements with thousands of elements - limit the attribute
248 count per element when parsing to 512 (in real-world HTML, P99 is ~ 8).
249 <https://github.com/jhy/jsoup/issues/1578>
250
251 * Bugfix [Fuzz]: Speed improvement for the foster formatting elements algo, by limiting how far up a crafted stack
252 to scan.
253 <https://github.com/jhy/jsoup/issues/1593>
254
255 * Bugfix [Fuzz]: Speed improvement when parsing crafted HTML when transferring form attributes.
256 <https://github.com/jhy/jsoup/issues/1595>
257
258 * Bugfix [Fuzz]: Speed improvement when the stack was thousands of items deep, and non-matching close tags sent.
259 <https://github.com/jhy/jsoup/issues/1596>
260
261 * Bugfix [Fuzz]: Speed improvement when an attribute name is 600K of quote characters or otherwise needs accumulation
262 vs being able to read in one hit.
263 <https://github.com/jhy/jsoup/issues/1605>
264
265 * Bugfix [Fuzz]: Speed improvement when closing missing empty tags (in XML comment processed as HTML) when thousands
266 deep in stack.
267 <https://github.com/jhy/jsoup/issues/1606>
268
269 * Bugfix [Fuzz]: Fix a potential stack-overflow in the parser given crafted HTML, when the parser looped in the
270 InSelectInTable state.
271
272 * Bugfix [Fuzz]: Fix an IOOB when the HTML root was cleared from the stack and then attributes were merged onto it.
273 <https://github.com/jhy/jsoup/issues/1611>
274
275 * Bugfix [Fuzz]: Improved the speed of parsing when crafted HTML contains hundreds of active formatting elements
276 that were copied for all new elements (similar to an amplification attack). The number of considered active
277 formatting elements that will be cloned when mis-nested is now capped to 12.
278 <https://github.com/jhy/jsoup/issues/1613>
279
280 *** Release 1.14.1 [2021-Jul-10]
281 * Change: updated the minimum supported Java version from Java 7 to Java 8.
282
283 * Change: updated the minimum Android API level from 8 to 10.
284
285 * Change: although Node#childNodes() returns an UnmodifiableList as a view into its children, it was still
286 directly backed by the internal child list. That made some uses, such as looping and moving those children to
287 another element, throw a ConcurrentModificationException. Now this method returns its own list so that they are
288 separated and changes to the parent's contents will not impact the children view. This aligns with similar methods
289 such as Element#children(). If you have code that iterates this list and makes parenting changes to its contents,
290 you may need to make a code update.
291 <https://github.com/jhy/jsoup/issues/1431>
292
293 * Change: the org.jsoup.Connection interface has been modified to introduce new methods for sessions and the cookie
294 store. If you have a custom implementation of this interface, you will need to add implementations of these methods.
295
296 * Improvement: added HTTP request session management support with Jsoup.newSession(). This extends the Connection
297 implementation to support (optional) sessions, which allow request defaults (timeout, proxy, etc) to be set once and
298 then applied to all requests within that session.
299
300 Cookies are re-implemented to correctly support path and domain filtering when used within a session. A default
301 in-memory cookie store is used for the session, or a custom implementation (perhaps disk-persistent, or pre-set)
302 can be used instead.
303
304 Forms submitted using the FormElement#submit() use the same session that was used to fetch the document and so pass
305 cookies and other defaults appropriately.
306
307 The session is multi-thread safe and can execute multiple requests concurrently. If the user accidentally tries to
308 execute the same request object across multiple threads (vs calling Connection#newRequest()),
309 that is detected cleanly and a clear exception is thrown (vs weird blowups in input stream reading, or forcing
310 everything through a synchronized bottleneck.
311 <https://github.com/jhy/jsoup/pull/1476>
312
313 * Improvement: renamed the Whitelist class to Safelist, with the goal of more inclusive language. A shim is provided
314 for backwards compatibility (source and binary). This shim is marked as deprecated and will be removed in the
315 jsoup 1.15.1 release.
316 <https://github.com/jhy/jsoup/pull/1464>
317
318 * Improvement: added support for Internationalized Domain Names (IDNs) in Jsoup.Connect.
319 <https://github.com/jhy/jsoup/issues/1300>
320
321 * Improvement: added support for loading and parsing gzipped HTML files in Jsoup.parse(File in, charset, baseUri).
322
323 * Improvement: reduced thread contention in HttpConnection and Document.
324 <https://github.com/jhy/jsoup/pull/1455>
325
326 * Improvement: better parsing performance when under high thread concurrency
327 <https://github.com/jhy/jsoup/pull/1402>
328
329 * Improvement: added Element#id(String) ID attribute setter.
330
331 * Improvement: in Document, #body() and #head() accessors will now automatically create those elements, if they were
332 missing (e.g. if the Document was not parsed from HTML). Additionally, the #body() method returns the frameset
333 element (instead of null) for frameset documents.
334
335 * Improvement: when cleaning a document, the output settings of the original document are cloned into the cleaned
336 document.
337 <https://github.com/jhy/jsoup/issues/1417>
338
339 * Improvement: when parsing XML, disable pretty-printing by default.
340 <https://github.com/jhy/jsoup/issues/1168>
341
342 * Improvement: much better performance in Node#clone() for large and deeply nested documents. Complexity was O(n^2) or
343 worse, now O(n).
344
345 * Improvement: during traversal using the NodeTraversor, nodes may now be replaced with Node#replaceWith(Node).
346 <https://github.com/jhy/jsoup/issues/1289>
347
348 * Improvement: added Element#insertChildren and Elment#prependChildren, as convenience methods in addition to
349 Element#insertChildren(index, children), for bulk moving nodes.
350
351 * Improvement: clean up relative URLs with too many .. segments better.
352 <https://github.com/jhy/jsoup/pull/1482>
353
354 * Build Improvement: integrated jsoup into the OSS Fuzz project, which semi-randomly generates millions of different
355 HTML and XML input files, searching for areas to improve in the parser for increased robustness and throughput.
356 <https://github.com/jhy/jsoup/issues/1502>
357
358 * Build Improvement: integrated with GitHub's CodeQL static code analyzer.
359 <https://github.com/jhy/jsoup/pull/1494>
360
361 * Build Improvement: moved to GitHub Workflows for build verification.
362
363 * Build Improvement: updated Jetty (used for integration tests; not bundled) to 9.4.42.
364
365 * Build Improvement: added nullability annotations and initial settings.
366 <https://github.com/jhy/jsoup/pull/1467>
367
368 * Bugfix: corrected the adoption agency algorithm, to handle cases where e.g. a <a> tag incorrectly nests further <a>
369 tags.
370 <https://github.com/jhy/jsoup/pull/1517> <https://github.com/jhy/jsoup/issues/845>
371
372 * Bugfix: when parsing HTML, could throw NPEs on some tags (isindex or table>input).
373 <https://github.com/jhy/jsoup/issues/1404>
374
375 * Bugfix: in HttpConnection.Request, headers beginning with "sec-" (e.g. Sec-Fetch-Mode) were silently discarded by
376 the underlying Java HttpURLConnection. These are now settable correctly.
377 <https://github.com/jhy/jsoup/issues/1461>
378
379 * Bugfix: when adding child Nodes to a Node, could incorrectly reparent all nodes if the first parent had the same
380 length of children as the incoming node list.
381
382 * Bugfix: when wrapping an orphaned element, would throw an NPE.
383
384 * Bugfix: when wrapping an element with HTML that included multiple sibling elements, those siblings were incorrectly
385 added as children of the wrapper instead of siblings.
386
387 * Bugfix: when setting the content of a script or style tag via the Element#html(String) method, the content is now
388 treated as a DataNode, not a TextNode. This means that characters like '<' will no longer be incorrectly escaped.
389 As a related ergonomic improvement, the same behavior applies for Element#text(String) (i.e. the content will be
390 treated as a DataNode, despite calling the text() method.
391 <https://github.com/jhy/jsoup/issues/1419>
392
393 * Bugfix: when wrapping HTML around an existing element with Element#wrap(String), will now take the content as
394 provided and ignore normal HTML tree-building rules. This allows for e.g. a div tag to be placed inside of p tags.
395
396 * Bugfix: the Elements#forms() method should return the selected immediate elements that are Forms, not children.
397 <https://github.com/jhy/jsoup/pull/1403>
398
399 * Bugfix: when creating a selector for an element with Element#cssSelector, if the element used a non-unique ID
400 attribute, the returned selector may not match the desired element.
401 <https://github.com/jhy/jsoup/issues/1085>
402
403 * Bugfix: corrected the toString() methods of the Evaluator classes.
404
405 * Bugfix: when converting a jsoup document to a W3C document (in W3CDom#convert), if a tag had XML illegal characters,
406 a DOMException would be thown. Now instead, that tag is represented as a text node.
407 <https://github.com/jhy/jsoup/issues/1093>
408
409 * Bugfix: if a HTML file ended with an open noscript tag, an "EOF" string would appear in the HTML output.
410
411 * Bugfix: when parsing a document as XML, automatically set the output syntax to XML, and ensure that "<" characters
412 in attributes are escaped as "&lt" (which is not required in HTML as the quoted attribute contents are safe, but is
413 required in XML).
414 <https://github.com/jhy/jsoup/issues/1420>
415
416 * Bugfix: [Fuzz] when parsing an attribute key containing "abs:abs", a validation error would be incorrectly
417 thrown.
418 <https://github.com/jhy/jsoup/issues/1541>
419
420 * Bugfix: [Fuzz] could NPE while parsing in resetInsertionMode().
421 <https://github.com/jhy/jsoup/issues/1538>
422
423 * Bugfix: [Fuzz] when parsing XML, could Stack Overflow when parsing XML declarations.
424 <https://github.com/jhy/jsoup/issues/1539>
425
426 * Bugfix: [Fuzz] fixed a potential Stack Overflow when parsing mis-nested tfoot tags, and updated the tree parser for
427 this situation to match the updated HTML5 spec.
428 <https://github.com/jhy/jsoup/issues/1543>
429
430 * Bugfix: [Fuzz] fixed a potentially slow HTML parse when tags are nested extremely deep (e.g. 88K depth), by limiting
431 the formatting tag search depth to 256. In practice, it's generally between 4 - 8.
432 <https://github.com/jhy/jsoup/issues/1544>
433
434 * Bugfix: [Fuzz] when parsing an unterminated RCDATA token (e.g. a <title> tag), could throw an IO Exception "No
435 buffer left to unconsume" when trying to rewind the buffer.
436 <https://github.com/jhy/jsoup/issues/1542>
437
438 *** Release 1.13.1 [2020-Feb-29]
439 * Improvement: added Element#closest(selector), which walks up the tree to find the nearest element matching the
440 selector.
441 <https://github.com/jhy/jsoup/issues/1326>
442
443 * Improvement: memory optimizations, reducing the retained size of a Document by ~ 39%, and allocations by ~ 9%:
444 1. Attributes holder in Elements is only created if the element has attributes
445 2. Only track the baseUri in an element when it is set via DOM to a new value for a given tree
446 3. After parsing, do not retain the input character reader (and associated buffers) in the Document#parser
447
448 * Improvement: substantial parse speed improvements vs 1.12.x (bringing back to par with previous releases).
449 <https://github.com/jhy/jsoup/issues/1327>
450
451 * Improvement: when pretty-printing, comments in inline tags are not pushed to a newline
452
453 * Improvement: added Attributes#hasDeclaredValueForKey(key) and Attribute#hasDeclaredValueForKeyIgnoreCase(), to check
454 if an attribute is set but has no value. Useful in place of the deprecated and removed BooleanAttribute class and
455 instanceof test.
456
457 * Improvement: removed old methods and classes that were marked deprecated in previous releases.
458
459 * Improvement: added Element#select(Evaluator) and Element#selectFirst(Evaluator), to allow re-use of a parsed CSS
460 selector if using the same evaluator many times.
461 <https://github.com/jhy/jsoup/issues/1319>
462
463 * Improvement: added Elements#forms(), Elements#textNodes(), Elements#dataNodes(), and Elements#comments(), as a
464 convenient way to get access to these node types directly from an element selection.
465
466 * Improvement: preserve whitespace before html and head tag, if pretty-printing is off.
467
468 * Bugfix: in a <select> tag, a second <optgroup> would not automatically close an earlier open <optgroup>
469 <https://github.com/jhy/jsoup/issues/1313>
470
471 * Bugfix: in CharacterReader when parsing an input stream, could throw a Mark Invalid exception if the reader was
472 marked, a bufferUp occurred, and then the reader was rewound.
473 <https://github.com/jhy/jsoup/issues/1324>
474
475 * Bugfix: empty tags and form tags did not have their attributes normalized (lower-cased by default)
476 <https://github.com/jhy/jsoup/pull/1323>
477
478 * Bugfix: when preserve case was set to on, the HTML pretty-print formatter didn't indent capitalized tags correctly.
479
480 * Bugfix: ensure that script and style contents are parsed into DataNodes, not TextNodes, when in case-sensitive
481 parse mode.
482
483 **** Release 1.12.2 [2020-Feb-08]
484 * Improvement: the :has() selector now supports relative selectors. For example, the query
485 "div:has(> a)" will select all "div" elements that have at least one direct child "a" element.
486 <https://github.com/jhy/jsoup/pull/1214>
487
488 * Improvement: added Element chaining methods for various overridden methods on Node.
489 <https://github.com/jhy/jsoup/issues/1193>
490
491 * Improvement: ensure HTTP keepalives work when fetching content via body() and bodyAsBytes().
492 <https://github.com/jhy/jsoup/issues/1232>
493
494 * Improvement: set the default max body size in Jsoup.Connection to 2MB (up from 1MB) so fewer people get trimmed
495 content if they have not set it, but still in sensible bounds. Also updated the default user-agent to improve
496 default compatibility.
497
498 * Improvement: dramatic speed improvement when bulk inserting child nodes into an element (wrapping contents).
499 <https://github.com/jhy/jsoup/issues/1281>
500
501 * Improvement: added Element#childrenSize() as a convenience to get the size of an element's element children.
502 <https://github.com/jhy/jsoup/pull/1291>
503
504 * Improvement: in W3CDom.asString, allow the output mode to be specified as HTML or as XML. It will default to
505 checking the content, and automatically selecting.
506
507 * Improvement: added a Document#documentType() method, to get a doc's doctype.
508
509 * Improvement: To DocumentType, added #name(), #publicID(), and #systemId() methods to fetch those fields.
510
511 * Improvement: in W3CDom conversions from jsoup documents, retain the DocumentType, and be able to serialize it.
512 <https://github.com/jhy/jsoup/issues/1183>
513
514 * Bugfix: on pages fetch by Jsoup.Connection, a "Mark Invalid" exception might be incorrectly thrown, or the page may
515 miss some data. This occurred on larger pages when the file transfer was chunked, and an invalid HTML entity
516 happened to cross a chunk boundary.
517 <https://github.com/jhy/jsoup/issues/1218>
518
519 * Bugfix: if duplicate attributes in an element exist, retain the first vs the last attribute with the same name. Case
520 aware (HTML case-insensitive names, XML are case-sensitive).
521 <https://github.com/jhy/jsoup/issues/1219>
522
523 * Bugfix: don't submit input type=button form elements.
524 <https://github.com/jhy/jsoup/issues/1231>
525
526 * Bugfix: handle error position reporting correctly and don't blow up in some edge cases.
527 <https://github.com/jhy/jsoup/issues/1251>
528 <https://github.com/jhy/jsoup/pull/1253>
529
530 * Bugfix: handle the ^= (starts with) selector correctly when the prefix starts with a space.
531 <https://github.com/jhy/jsoup/pull/1280>
532
533 * Bugfix: don't strip out zero-width-joiners (or zero-width-non-joiners) when normalizing text. That breaks combined
534 emoji (and other text semantics). 🤦‍♂️
535 <https://github.com/jhy/jsoup/issues/1269>
536
537 * Bugfix: Evaluator.TagEndsWith (namespaced elements) and Tag disagreed in case-sensitivity. Now correctly matches
538 case-insensitively.
539 <https://github.com/jhy/jsoup/issues/1257>
540
541 * Bugfix: Don't throw an exception if a selector ends in a space, just trim it.
542 <https://github.com/jhy/jsoup/issues/1274>
543
544 * Bugfix: HTML parser adds redundant text when parsing self-closing textarea.
545 <https://github.com/jhy/jsoup/issues/1220>
546
547 * Bugfix: Don't add spurious whitespace or newlines to HTML or text for inline tags.
548 <https://github.com/jhy/jsoup/issues/1305>
549 <https://github.com/jhy/jsoup/issues/731>
550
551 * Bugfix: TextNode.outerHtml() wouldn't normalize correctly without a parent.
552 <https://github.com/jhy/jsoup/issues/1309>
553
554 * Bugfix: Removed binary input detection as it was causing too many false positives.
555 <https://github.com/jhy/jsoup/issues/1250>
556
557 * Bugfix: when cloning a TextNode, if .attributes() was hit before the clone() method, the text value would only be a
558 shallow clone.
559 <https://github.com/jhy/jsoup/issues/1176>
560
561 * Various code hygiene updates.
562
563 **** Release 1.12.1 [2019-May-12]
564 * Change: removed deprecated method to disable TLS cert checking Connection.validateTLSCertificates().
565
566 * Change: some internal methods have been rearranged; if you extended any of the Jsoup internals you may need to make
567 updates.
568
569 * Improvement: documents now remember their parser, so when later manipulating them, the correct HTML or XML tree
570 builder is reused, as are the parser settings like case preservation.
571 <https://github.com/jhy/jsoup/issues/769>
572
573 * Improvement: Jsoup now detects the character set of the input if specified in an XML Declaration, when using the
574 HTML parser. Previously that only happened when the XML parser was specified.
575 <https://github.com/jhy/jsoup/issues/1009>
576
577 * Improvement: if the document's input character set does not support encoding, flip it to one that does.
578 <https://github.com/jhy/jsoup/issues/1007>
579
580 * Improvement: if a start tag is missing a > and a new tag is seen with a <, treat that as a new tag. (This differs
581 from the HTML5 spec, which would make at attribute with a name beginning with <, but in practice this impacts too
582 many pages.
583 <https://github.com/jhy/jsoup/issues/797>
584
585 * Improvement: performance tweaks when parsing start tags, data, tables.
586
587 * Improvement: added Element.nextElementSiblings() and Element.previousElementSiblings()
588 <https://github.com/jhy/jsoup/pull/1054>
589
590 * Improvement: treat center tags as block tags.
591 <https://github.com/jhy/jsoup/pull/1113>
592
593 * Improvement: allow forms to be submitted with Content-Type=multipart/form-data without requiring a file upload;
594 automatically set the mime boundary.
595 <https://github.com/jhy/jsoup/pull/1058>
596
597 * Improvement: Jsoup will now detect if an input file or URL is binary, and will refuse to attempt to parse it, with
598 an IO exception. This prevents runaway processing time and wasted effort creating meaningless parsed DOM trees.
599 <https://github.com/jhy/jsoup/issues/1192>
600
601 * Bugfix: when using the tag case preserving parsing settings, certain HTML tree building rules where not followed
602 for upper case tags.
603 <https://github.com/jhy/jsoup/issues/1149>
604
605 * Bugfix: when converting a Jsoup document to a W3C DOM, if an element is namespaced but not in a defined namespace,
606 set it to the global namespace.
607 <https://github.com/jhy/jsoup/issues/848>
608
609 * Bugfix: attributes created with the Attribute constructor with just spaces for names would incorrectly pass
610 validation.
611 <https://github.com/jhy/jsoup/issues/1159>
612
613 * Bugfix: some pseudo XML Declarations were incorrectly handled when using the XML Parser, leading to an IOOB
614 exception when parsing.
615 <https://github.com/jhy/jsoup/issues/1139>
616
617 * Bugfix: when parsing URL parameter names in an attribute that is not correctly HTML encoded, and near the end of the
618 current buffer, those parameters may be incorrectly dropped. (Improved CharacterReader mark/reset support.)
619 <https://github.com/jhy/jsoup/pull/1154>
620
621 * Bugfix: boolean attribute values would be returned as null, vs an empty string, when accessed via the
622 Attribute#getValue() method.
623 <https://github.com/jhy/jsoup/issues/1065>
624
625 * Bugfix: orphan Attribute objects (i.e. created outside of a parse or an Element) would throw an NPE on
626 Attribute#setValue(val)
627 <https://github.com/jhy/jsoup/issues/1107>
628
629 * Bugfix: Element.shallowClone() was not making a clone of its attributes.
630 <https://github.com/jhy/jsoup/issues/1201>
631
632 * Bugfix: fixed an ArrayIndexOutOfBoundsException in HttpConnection.looksLikeUtf8 when testing small strings in
633 specific ranges.
634 <https://github.com/jhy/jsoup/issues/1172>
635
636 * Updated jetty-server (which is used for integration tests) to latest 9.2 series (9.2.28).
637
638 *** Release 1.11.3 [2018-Apr-15]
639 * Improvement: CDATA sections are now treated as whitespace preserving (regardless of the containing element), and are
640 round-tripped into output HTML.
641 <https://github.com/jhy/jsoup/issues/406>
642 <https://github.com/jhy/jsoup/issues/965>
643
644 * Improvement: added support for Deflate encoding.
645 <https://github.com/jhy/jsoup/pull/982>
646
647 * Improvement: when parsing <pre> tags, skip the first newline if present.
648 <https://github.com/jhy/jsoup/issues/825>
649
650 * Improvement: support nested quotes for attribute selection queries.
651 <https://github.com/jhy/jsoup/pull/988>
652
653 * Improvement: character references from Windows-1252 that are not valid Unicode are mapped to the appropriate
654 Unicode replacement.
655 <https://github.com/jhy/jsoup/pull/1046>
656
657 * Improvement: accept a custom SSL socket factory in Jsoup.Connection.
658 <https://github.com/jhy/jsoup/pull/1038>
659
660 * Bugfix: "Mark has been invalidated" exception was thrown when parsing some URLs on Android <= 6.
661 <https://github.com/jhy/jsoup/issues/990>
662
663 * Bugfix: The Element.text() for <div>One</div>Two was "OneTwo", not "One Two".
664 <https://github.com/jhy/jsoup/issues/812>
665
666 * Bugfix: boolean attributes with empty string values were not collapsing in HTML output.
667 <https://github.com/jhy/jsoup/issues/985>
668
669 * Bugfix: when using the XML Parser set to lowercase normalize tags, uppercase closing tags were not correctly
670 handled.
671 <https://github.com/jhy/jsoup/issues/998>
672
673 * Bugfix: when parsing from a URL, an end tag could be read incorrectly if it started on a buffer boundary.
674 <https://github.com/jhy/jsoup/issues/995>
675
676 * Bugfix: when parsing from a URL, if the remote server failed to complete its write (i.e. it writes less than the
677 Content Length header promised on a gzipped stream), the parse method would incorrectly throw an unchecked
678 exception. It now throws the declared IOException.
679 <https://github.com/jhy/jsoup/issues/980>
680
681 * Bugfix: leaf nodes (such as text nodes) where throwing an unsupported operation exception on childNodes(), instead
682 of just returning an empty list.
683 <https://github.com/jhy/jsoup/issues/1032>
684
685 * Bugfix: documents with a leading UTF-8 BOM did not have that BOM consumed, so it acted as a zero width no-break
686 space, which could impact the parse tree.
687 <https://github.com/jhy/jsoup/issues/1003>
688
689 * Bugfix: when parsing an invalid XML declaration, the parse would fail.
690 <https://github.com/jhy/jsoup/issues/1015>
691
692 *** Release 1.11.2 [2017-Nov-19]
693 * Improvement: added a new pseudo selector :matchText, which allows text nodes to match as if they were elements.
694 This enables finding text that is only marked by a "br" tag, for example.
695 <https://github.com/jhy/jsoup/issues/550>
696
697 * Change: marked Connection.validateTLSCertificates() as deprecated.
698
699 * Improvement: normalize invisible characters (like soft-hyphens) in Element.text().
700 <https://github.com/jhy/jsoup/issues/978>
701
702 * Improvement: added Element.wholeText(), to easily get the un-normalized text value of an element and its children.
703 <https://github.com/jhy/jsoup/pull/564>
704
705 * Bugfix: in a deep DOM stack, a StackOverFlow exception could occur when generating implied end tags.
706 <https://github.com/jhy/jsoup/issues/966>
707
708 * Bugfix: when parsing attribute values that happened to cross a buffer boundary, a character was dropped.
709 <https://github.com/jhy/jsoup/issues/967>
710
711 * Bugfix: fixed an issue that prevented using infinite timeouts in Jsoup.Connection.
712 <https://github.com/jhy/jsoup/issues/968>
713
714 * Bugfix: whitespace preserving tags were not honoured when nested deeper than two levels deep.
715 <https://github.com/jhy/jsoup/issues/722>
716
717 * Bugfix: an unterminated comment token at the end of the HTML input would cause an out of bounds exception.
718 <https://github.com/jhy/jsoup/issues/972>
719
720 * Bugfix: an NPE in the Cleaner which would occur if an <a href> attribute value was missing.
721 <https://github.com/jhy/jsoup/issues/973>
722
723 * Bugfix: when serializing the same document in a multiple threads, on Android, with a character set that is not ascii
724 or UTF-8, an encoding exception could occur.
725 <https://github.com/jhy/jsoup/issues/970>
726
727 * Bugfix: removing a form value from the DOM would not remove it from FormData.
728 <https://github.com/jhy/jsoup/pull/969>
729
730 * Bugfix: in the W3CDom transformer, siblings were incorrectly inheriting namespaces defined on previous siblings.
731 <https://github.com/jhy/jsoup/issues/977>
732
733 *** Release 1.11.1 [2017-Nov-06]
734 * Updated language level to Java 7 from Java 5. To maintain Android support (of minversion 8), try-with-resources are
735 not used.
736 <https://github.com/jhy/jsoup/issues/899>
737
738 * When loading content from a URL or a file, the content is now parsed as it streams in from the network or disk,
739 rather than being fully buffered before parsing. This substantially reduces memory consumption & large garbage
740 objects when loading large files. Note that this change means that a response, once parsed, may not be parsed
741 again from the same response object unless you call response.bufferUp() first, which will buffer the full response
742 into memory.
743 <https://github.com/jhy/jsoup/issues/904>
744
745 * Added Connection.Response.bodyStream(), a method to get the response body as an input stream. This is useful for
746 saving a large response straight to a file, without buffering fully into memory first.
747
748 * Performance improvements in text and HTML generation (through less GC).
749
750 * Reduced memory consumption of text, scripts, and comments in the DOM by 40%, by refactoring the node
751 hierarchy to not track childnodes or attributes by default for lead nodes. For the average document, that's about a
752 30% memory reduction.
753 <https://github.com/jhy/jsoup/issues/911>
754
755 * Reduced memory consumption of Elements by refactoring their Attributes to be a simple pair of arrays, vs a
756 LinkedHashSet.
757 <https://github.com/jhy/jsoup/issues/911>
758
759 * Added support for Element.selectFirst(query), to efficiently find the first matching element.
760
761 * Added Element.appendTo(parent) to simplify slinging elements about.
762 <https://github.com/jhy/jsoup/pull/662>
763
764 * Added support for multiple headers with the same name in Jsoup.Connect
765
766 * Added Element.shallowClone() and Node.shallowClone(), to allow cloning nodes without getting all their children.
767 <https://github.com/jhy/jsoup/issues/900>
768
769 * Updated Element.text() and the :contains(text) selector to consider &nbsp; character as spaces.
770
771 * Updated Jsoup.connect().timeout() to implement a total connect + combined read timeout. Previously it specified
772 connect and buffer read times only, so to implement a combined total timeout, you had to have another thread send
773 an interrupt.
774
775 * Improved performance of Node.addChildren (was quadratic)
776 <https://github.com/jhy/jsoup/pull/930>
777
778 * Added missing support for template tags in tables
779 <https://github.com/jhy/jsoup/pull/901>
780
781 * In Jsoup.connect file uploads, added the ability to set the uploaded files' mimetype.
782 <https://github.com/jhy/jsoup/issues/936>
783
784 * Improved Node traversal, including less object creation, and partial and filtering traversor support.
785 <https://github.com/jhy/jsoup/pull/849>
786
787 * Bugfix: if a document was was re-decoded after character set detection, the HTML parser was not reset correctly,
788 which could lead to an incorrect DOM.
789 <https://github.com/jhy/jsoup/issues/877>
790
791 * Bugfix: attributes with the same name but different case would be incorrectly treated as different attributes.
792 <https://github.com/jhy/jsoup/pull/903>
793
794 * Bugfix: self-closing tags for known empty elements were incorrectly treated as errors.
795 <https://github.com/jhy/jsoup/issues/868>
796
797 * Bugfix: fixed an issue where a self-closing title, noframes, or style tag would cause the rest of the page to be
798 incorrectly parsed as data or text.
799 <https://github.com/jhy/jsoup/issues/906>
800
801 * Bugfix: fixed an issue with unknown mixed-case tags
802 <https://github.com/jhy/jsoup/pull/942>
803
804 * Bugfix: fixed an issue where the entity resources were left open after startup, causing a warning.
805 <https://github.com/jhy/jsoup/pull/928>
806
807 * Bugfix: fixed an issue where Element.getElementsByIndexLessThan(index) would incorrectly provide the root element
808 <https://github.com/jhy/jsoup/pull/918>
809
810 * Improved parse time for pages with exceptionally deeply nested tags.
811 <https://github.com/jhy/jsoup/issues/955>
812
813 * Improvement / workaround: modified the Entities implementation to load its data from a .class vs from a jar resource.
814 Faster, and safer on Android.
815 <https://github.com/jhy/jsoup/issues/959>
816
817 *** Release 1.10.3 [2017-Jun-11]
818 * Added Elements.eachText() and Elements.eachAttr(name), which return a list of Element's text or attribute values,
819 respectively. This makes it simpler to for example get a list of each URL on a page:
820 List<String> urls = doc.select("a").eachAttr("abs:href"");
821
822 * Improved selector validation for :contains(...) with unbalanced quotes.
823 <https://github.com/jhy/jsoup/issues/803>
824
825 * Improved the speed of index based CSS selectors and other methods that use elementSiblingIndex, by a factor of 34x.
826 <https://github.com/jhy/jsoup/pull/862>
827
828 * Added Node.clearAttributes(), to simplify removing of all attributes of a Node / Element.
829 <https://github.com/jhy/jsoup/issues/829>
830
831 * Bugfix: if an attribute name started or ended with a control character, the parse would fail with a validation
832 exception.
833 <https://github.com/jhy/jsoup/issues/793>
834
835 * Bugfix: Element.hasClass() and the ".classname" selector would not find the class attribute case-insensitively.
836 <https://github.com/jhy/jsoup/issues/814>
837
838 * Bugfix: In Jsoup.Connection, if a redirect contained a query string with %xx escapes, they would be double escaped
839 before the redirect was followed, leading to fetching an incorrect location.
840
841 * Bugfix: In Jsoup.Connection, if a request body was set and the connection was redirected, the body would incorrectly
842 still be sent.
843 <https://github.com/jhy/jsoup/pull/881>
844
845 * Bugfix: In DataUtil when detecting the character set from meta data, and there are two Content-Types defined, use
846 the one that defines a character set.
847 <https://github.com/jhy/jsoup/pull/835>
848
849 * Bugfix: when parsing unknown tags in case-sensitive HTML mode, end tags would not close scope correctly.
850 <https://github.com/jhy/jsoup/issues/819>
851
852 * In Jsoup.Connection, ensure there is no Content-Type set when being redirected to a GET.
853 <https://github.com/jhy/jsoup/pull/895>
854
855 * Bugfix: in certain locales (Turkey specifically), lowercasing and case insensitivity could fail for specific items.
856 <https://github.com/jhy/jsoup/pull/820>
857
858 * Bugfix: after an element was cloned, changes to its child list where not notifying the element correctly.
859 <https://github.com/jhy/jsoup/issues/951>
860
861 *** Release 1.10.2 [2017-Jan-02]
862 * Improved startup time, particularly on Android, by reducing garbage generation and CPU execution time when loading
863 the HTML entity files. About 1.72x faster in this area.
864
865 * Added Element.is(query) to check if an element matches this CSS query.
866
867 * Added new methods to Elements: next(query), nextAll(query), prev(query), prevAll(query) to select next and previous
868 element siblings from a current selection, with optional selectors.
869
870 * Added Node.root() to get the topmost ancestor of a Node.
871
872 * Added the new selector :containsData(), to find elements that hold data, like script and style tags.
873
874 * Changed Jsoup.isValid(bodyHtml) to validate that the input contains only body HTML that is safe according to the
875 safelist, and does not include HTML errors. And in the Jsoup.Cleaner.isValid(Document) method, make sure the doc
876 only includes body HTML.
877 <https://github.com/jhy/jsoup/issues/245>
878 <https://github.com/jhy/jsoup/issues/632>
879
880 * In Safelists, validate that a removed protocol exists before removing said protocol.
881
882 * Allow the Jsoup.Connect thread to be interrupted when reading the input stream; helps when reading from a long stream
883 of data that doesn't read timeout.
884 <https://github.com/jhy/jsoup/pull/712>
885
886 * Jsoup.Connect now uses a desktop user agent by default. Many developers were getting caught by not specifying the
887 user agent, and sending the default 'Java'. That causes many servers to return different content than what they would
888 to a desktop browser, and what the developer was expecting.
889
890 * Increased the default connect/read timeout in Jsoup.Connect to 30 seconds.
891
892 * Jsoup.Connect now detects if a header value is actually in UTF-8 vs the HTTP spec of ISO-8859, and converts
893 the header value appropriately. This improves compatibility with servers that are configured incorrectly.
894
895 * Bugfix: in Jsoup.Connect, URLs containing non-URL-safe characters were not encoded to URL safe correctly.
896 <https://github.com/jhy/jsoup/issues/706>
897
898 * Bugfix: a "SYSTEM" flag in doctype tags would be incorrectly removed.
899 <https://github.com/jhy/jsoup/issues/408>
900
901 * Bugfix: removing attributes from an Element with removeAttr() would cause a ConcurrentModificationException.
902
903 * Bugfix: the contents of Comment nodes were not returned by Element.data()
904
905 * Bugfix: if source checked out on Windows with git autocrlf=true, Entities.load would fail because of the \r char.
906
907 *** Release 1.10.1 [2016-Oct-23]
908 * New feature: added the option to preserve case for tags and/or attributes, with ParseSettings. By default, the HTML
909 parser will continue to normalize tag names and attribute names to lower case, and the XML parser will now preserve
910 case, according to the relevant spec. The CSS selectors for tags and attributes remain case insensitive, per the CSS
911 spec.
912
913 * Improved support for extended HTML entities, including supplemental characters and multiple character references.
914 Also reduced memory consumption of the entity tables.
915 <https://github.com/jhy/jsoup/issues/602>
916 <https://github.com/jhy/jsoup/issues/603>
917
918 * Added support for *|E wildcard namespace selectors.
919 <https://github.com/jhy/jsoup/pull/724>
920
921 * Added support for setting multiple connection headers at once with Connection.headers(Map)
922 <https://github.com/jhy/jsoup/pull/725>
923
924 * Added support for setting/overriding the response character set in Connection.Response, for cases where the charset
925 is not defined by the server, or is defined incorrectly.
926 <https://github.com/jhy/jsoup/issues/743>
927
928 * Improved performance of class selectors by reducing memory allocation and garbage collection.
929 <https://github.com/jhy/jsoup/pull/753>
930
931 * Improved performance of HTML output by reducing the creation of temporary attribute list iterators.
932 <https://github.com/jhy/jsoup/pull/755>
933
934 * Fixed an issue when converting to the W3CDom XML, where valid (but ugly) HTML attribute names containing characters
935 like '"' could not be converted into valid XML attribute names. These attribute names are now normalized if possible,
936 or not added to the XML DOM.
937 <https://github.com/jhy/jsoup/issues/721>
938
939 * Fixed an OOB exception when loading an empty-body URL and parsing with the XML parser.
940 <https://github.com/jhy/jsoup/issues/727>
941
942 * Fixed an issue where attribute names starting with a slash would be parsed incorrectly.
943 <https://github.com/jhy/jsoup/pull/748>
944
945 * Don't reuse charset encoders from OutputSettings, to make threadsafe.
946 <https://github.com/jhy/jsoup/issues/740>
947
948 * Fixed an issue in connections with a requestBody where a custom content-type header could be ignored.
949 <https://github.com/jhy/jsoup/issues/756>
950
951 *** Release 1.9.2 [2016-May-17]
952 * Fixed an issue where tag names that contained non-ascii characters but started with an ascii character
953 would cause the parser to get stuck in an infinite loop.
954 <https://github.com/jhy/jsoup/issues/704>
955
956 * In XML documents, detect the charset from the XML prolog - <?xml encoding="UTF-8"?>
957 <https://github.com/jhy/jsoup/issues/701>
958
959 * Fixed an issue where created XML documents would have an incorrect prolog.
960 <https://github.com/jhy/jsoup/issues/652>
961
962 * Fixed an issue where you could not use an attribute selector to find values containing unbalanced braces or
963 parentheses.
964 <https://github.com/jhy/jsoup/issues/611>
965
966 * Fixed an issue where namespaced tags (like <fb:comment>) would cause Element.cssSelector() to fail.
967 <https://github.com/jhy/jsoup/pull/677>
968
969 *** Release 1.9.1 [2016-Apr-16]
970 * Added support for HTTP and SOCKS request proxies, specifiable per connection.
971 <https://github.com/jhy/jsoup/pull/570>
972
973 * Added support for sending plain HTTP request bodies in POST and PUT requests, with Connection.requestBody(String).
974
975 * Added support in Jsoup.Connect for HEAD, OPTIONS, TRACE.
976 <https://github.com/jhy/jsoup/issues/613>
977
978 * Added support for HTTP 307 Temporary Redirect (replays posts, if applicable).
979 <https://github.com/jhy/jsoup/pull/666>
980
981 * Performance improvements when parsing HTML, particularly for Android Dalvik.
982
983 * Added support for writing HTML into Appendable objects (like OutputStreamWriter), to enable stream serialization.
984 <https://github.com/jhy/jsoup/pull/470/>
985
986 * Added support for XML namespaces when converting jsoup documents to W3C documents.
987 <https://github.com/jhy/jsoup/pull/672>
988
989 * Added support for UTF-16 and UTF-32 character set detection from byte-order-marks (BOM).
990 <https://github.com/jhy/jsoup/issues/695>
991
992 * Added support for tags with non-ascii (unicode) letters.
993 <https://github.com/jhy/jsoup/issues/667>
994
995 * Added Connection.data(key) to retrieve a data KeyVal by its key. Useful to update form data before submission.
996
997 * Fixed an issue in the Parent selector where it would not match against the root element it was applied to.
998 <https://github.com/jhy/jsoup/pull/619>
999
1000 * Fix an issue where elements.select(query) would not return every matching element if they had the same content.
1001 <https://github.com/jhy/jsoup/issues/614>
1002
1003 * Added not-null validators to Element.appendText() and Element.prependText()
1004 <https://github.com/jhy/jsoup/issues/690>
1005
1006 * Fixed an issue when moving moving nodes using Element.insert(index, children) where the sibling index would be set
1007 incorrectly, leading to the original loads being lost.
1008 <https://github.com/jhy/jsoup/issues/689>
1009
1010 * Reverted Node.equals() and Node.hashCode() back to identity (object) comparisons, as deep content inspection
1011 had negative performance impacts and hashkey stability problems. Functionality replaced with Node.hasSameContent().
1012 <https://github.com/jhy/jsoup/issues/688>
1013
1014 * In Jsoup.Connect, if the same header key is seen multiple times, combine their values with a comma per the HTTP RFC,
1015 instead of keeping just one value. Also fixes an issue where header values could be out of order.
1016 <https://github.com/jhy/jsoup/issues/618>
1017
1018 *** Release 1.8.3 [2015-Aug-02]
1019 * Added support for custom boolean attributes.
1020 <https://github.com/jhy/jsoup/pull/555>
1021
1022 * When fetching XML URLs, automatically switch to the XML parser instead of the HTML parser.
1023 <https://github.com/jhy/jsoup/pull/574>
1024
1025 * Performance improvement on parsing larger HTML pages. On Android KitKat, around 1.7x times faster. On Android
1026 Lollipop, ~ 1.3x faster. Improvements largely from re-ordering the HtmlTreeBuilder methods based on analysis of
1027 various websites; also from further memory reduction for nodes with no children, and other tweaks.
1028
1029 * Fixed an issue in Element.getElementSiblingIndex (and related methods) where sibling elements with the same content
1030 would incorrectly have the same sibling index.
1031 <https://github.com/jhy/jsoup/issues/554>
1032
1033 * Fixed an issue where unexpected elements in a badly nested table could be moved to the wrong location in the
1034 document.
1035 <https://github.com/jhy/jsoup/issues/552>
1036
1037 * Fixed an issue where a table nested within a TH cell would parse to an incorrect tree.
1038 <https://github.com/jhy/jsoup/issues/575>
1039
1040 * When serializing a document using the XHTML encoding entities, if the character set did not support &nbsp; chars
1041 (such as Shift_JIS), the character would be skipped. For visibility, will now always output &xa0; when using XHTML
1042 encoding entities (as &nbsp; is not defined), regardless of the output character set.
1043 <https://github.com/jhy/jsoup/issues/523>
1044
1045 * Fixed an issue when resolving URLs, if the absolute URL had no path, the relative URL was not normalized correctly.
1046 Also fixed an issue where connections that were redirected to a relative URL did not have the same normalization
1047 rules as a URL read from Nodes.absUrl(String).
1048 <https://github.com/jhy/jsoup/issues/585>
1049
1050 * When serialising XML, ensure that '<' characters in attributes are escaped, per spec. Not required in HTML.
1051 <https://github.com/jhy/jsoup/issues/528>
1052
1053 *** Release 1.8.2 [2015-Apr-13]
1054 * Performance improvements for parsing HTML on Android, of 1.5x to 1.9x, with larger parses getting a bigger
1055 speed increase. For non-Android JREs, around 1.1x to 1.2x.
1056
1057 * Dramatic performance improvement in HTML serialization on Android (KitKat and later), of 115x. Improvement by working
1058 around a character set encoding speed regression in Android.
1059 <https://github.com/jhy/jsoup/issues/383>
1060
1061 * Performance improvement for the class name selector on Android (.class) of 2.5x to 14x. Around 1.2x
1062 on non-Android JREs.
1063
1064 * File upload support. Added the ability to specify input streams for POST data, which will upload content in
1065 MIME multipart/form-data encoding.
1066
1067 * Add a meta-charset element to documents when setting the character set, so that the document's charset is
1068 unambiguous.
1069 <https://github.com/jhy/jsoup/pull/486>
1070
1071 * Added ability to disable TLS (SSL) certificate validation. Helpful if you're hitting a host with a bad cert,
1072 or your JDK doesn't support SNI.
1073 <https://github.com/jhy/jsoup/pull/343>
1074
1075 * Added ability to further tweak the canned Cleaner Safelists by removing existing settings.
1076 <https://github.com/jhy/jsoup/pull/449>
1077
1078 * Added option in Cleaner Safelist to allow linking to in-page anchors (#)
1079 <https://github.com/jhy/jsoup/pull/441>
1080
1081 * Use a lowercase doctype tag for HTML5 documents.
1082
1083 * Add support for 201 Created with redirect, and other status codes. Treats any HTTP status code 2xx or 3xx as an OK
1084 response, and follow redirects whenever there is a Location header.
1085 <https://github.com/jhy/jsoup/issues/312>
1086
1087 * Added support for HTTP method verbs PUT, DELETE, and PATCH.
1088
1089 * Added support for overriding the default POST character of UTF-8
1090 <https://github.com/jhy/jsoup/pull/491>
1091
1092 * W3C DOM support: added ability to convert from a jsoup document to a W3C document, with the W3Dom helper class.
1093
1094 * In the HtmlToPlainText example program, added the ability to filter using a CSS selector. Also clarified
1095 the usage documentation.
1096
1097 * Fixed validation of cookie names in HttpConnection cookie methods.
1098 <https://github.com/jhy/jsoup/pull/377>
1099
1100 * Fixed an issue where <option> tags would be missed when preparing a form for submission if missing a selected
1101 attribute.
1102
1103 * Fixed an issue where submitting a form would incorrectly include radio and checkbox values without the checked
1104 attribute.
1105
1106 * Fixed an issue where Element.classNames() would return a set containing an empty class; and may have extraneous
1107 whitespace.
1108 <https://github.com/jhy/jsoup/pull/469>
1109
1110 * Fixed an issue where attributes selected by value were not correctly space normalized.
1111 <https://github.com/jhy/jsoup/pull/526>
1112
1113 * In head+noscript elements, treat content as character data, instead of jumping out of head parsing.
1114 <https://github.com/jhy/jsoup/pull/540>
1115
1116 * Fixed performance issue when parsing HTML with elements with many children that need re-parenting.
1117 <https://github.com/jhy/jsoup/pull/506>
1118
1119 * Fixed an issue where a server returning an unsupported character set response would cause a runtime
1120 UnsupportedCharsetException, instead of falling back to the default UTF-8 charset.
1121 <https://github.com/jhy/jsoup/pull/509>
1122
1123 * Fixed an issue where Jsoup.Connection would throw an IO Exception when reading a page with zero content-length.
1124 <https://github.com/jhy/jsoup/issues/538>
1125
1126 * Improved the equals() and hashcode() methods in Node, to consider all their child content, for DOM tree comparisons.
1127 <https://github.com/jhy/jsoup/issues/537>
1128
1129 * Improved performance in Selector when searching multiple roots.
1130 <https://github.com/jhy/jsoup/issues/518>
1131
1132 *** Release 1.8.1 [2014-Sep-27]
1133 * Introduced the ability to chose between HTML and XML output, and made HTML the default. This means img tags are
1134 output as <img>, not <img />. XML is the default when using the XmlTreeBuilder. Control this with the
1135 Document.OutputSettings.syntax() method.
1136
1137 * Improved the performance of Element.text() by 3.2x
1138
1139 * Improved the performance of Element.html() by 1.7x
1140
1141 * Improved file read time by 2x, giving around a 10% speed improvement to file parses.
1142 <https://github.com/jhy/jsoup/issues/248>
1143
1144 * Tightened the scope of what characters are escaped in attributes and textnodes, to align with the spec. Also, when
1145 using the extended escape entities map, only escape a character if the current output charset does not support it.
1146 This produces smaller, more legible HTML, with greater control over the output (by setting charset and escape mode).
1147
1148 * If pretty-print is disabled, don't trim outer whitespace in Element.html()
1149 <https://github.com/jhy/jsoup/issues/368>
1150
1151 * In the HTML Cleaner, allow span tags in the basic safelist, and span and div tags in the relaxed safelist.
1152
1153 * Added Element.cssSelector(), which returns a unique CSS selector/path for an element.
1154 <https://github.com/jhy/jsoup/pull/459>
1155
1156 * Fixed an issue where <svg><img/></svg> was parsed as <svg><image/></svg>
1157 <https://github.com/jhy/jsoup/issues/364>
1158
1159 * Fixed an issue where a UTF-8 BOM character was not detected if the HTTP response did not specify a charset, and
1160 the HTML body did, leading to the head contents incorrectly being parsed into the body. Changed the behavior so that
1161 when the UTF-8 BOM is detected, it will take precedence for determining the charset to decode with.
1162 <https://github.com/jhy/jsoup/issues/348>
1163
1164 * Relaxed doctype validation, allowing doctypes to not specify a name.
1165 <https://github.com/jhy/jsoup/issues/460>
1166
1167 * Fixed an issue in parsing a base URI when loading a URL containing a http-equiv element.
1168 <https://github.com/jhy/jsoup/issues/440>
1169
1170 * Fixed an issue for Java 1.5 / Android 2.2 compatibility, and verify it doesn't regress.
1171 <https://github.com/jhy/jsoup/issues/375>
1172 <https://github.com/jhy/jsoup/pull/403>
1173
1174 * Fixed an issue that would throw an NPE when trying to set invalid HTML into a title element.
1175 <https://github.com/jhy/jsoup/pull/410>
1176
1177 * Added support for quoted attribute values in CSS Selectors
1178 <https://github.com/jhy/jsoup/pull/400>
1179
1180 * Fixed support for nth-of-type selectors with unknown tags.
1181 <https://github.com/jhy/jsoup/pull/402>
1182
1183 * Added support for 'application/*+xml' mimetypes.
1184 <https://github.com/jhy/jsoup/pull/444>
1185
1186 * Fixed support for allowing script tags in cleaner Safelists.
1187 <https://github.com/jhy/jsoup/issues/299>
1188 <https://github.com/jhy/jsoup/issues/388>
1189
1190 * In FormElements, don't submit disabled inputs, and use 'on' as checkbox value default.
1191 <https://github.com/jhy/jsoup/issues/489>
1192
1193 *** Release 1.7.3 [2013-Nov-10]
1194 * Introduced FormElement, providing easy access to form controls and their data, and the ability to submit forms
1195 with Jsoup.Connect.
1196
1197 * Reduced GC impact during HTML parsing, with 17% fewer objects created, and 3% faster parses.
1198
1199 * Reduced CSS selection time by 26% for common queries.
1200
1201 * Improved HTTP character set detection.
1202 <https://github.com/jhy/jsoup/pull/325> <https://github.com/jhy/jsoup/issues/321>
1203
1204 * Added Document.location, to get the URL the document was retrieved from. Helpful if connection was redirected.
1205 <https://github.com/jhy/jsoup/pull/306>
1206
1207 * Fixed support for self-closing script tags.
1208 <https://github.com/jhy/jsoup/issues/305>
1209
1210 * Fixed a crash when reading an unterminated CDATA section.
1211 <https://github.com/jhy/jsoup/issues/349>
1212
1213 * Fixed an issue where elements added via the adoption agency algorithm did not preserve their attributes.
1214 <https://github.com/jhy/jsoup/issues/313>
1215
1216 * Fixed an issue when cloning a document with extremely nested elements that could cause a stack-overflow.
1217 <https://github.com/jhy/jsoup/issues/290>
1218
1219 * Fixed an issue when connecting or redirecting to a URL that contains a space.
1220 <https://github.com/jhy/jsoup/pull/354> <https://github.com/jhy/jsoup/issues/114>
1221
1222 * Added support for the HTTP/1.1 Temporary Redirect (307) status code.
1223 <https://github.com/jhy/jsoup/issues/452>
1224
1225 *** Release 1.7.2 [2013-Jan-27]
1226 * Added support for supplementary characters outside of the Basic Multilingual Plane.
1227 <https://github.com/jhy/jsoup/issues/288> <https://github.com/jhy/jsoup/pull/289>
1228
1229 * Added support for structural pseudo CSS selectors, including :first-child, :last-child, :nth-child, :nth-last-child,
1230 :first-of-type, :last-of-type, :nth-of-type, :nth-last-of-type, :only-child, :only-of-type, :empty, and :root
1231 <https://github.com/jhy/jsoup/pull/208>
1232
1233 * Added a maximum body response size to Jsoup.Connection, to prevent running out of memory when trying to read
1234 extremely large documents. The default is 1MB.
1235
1236 * Refactored the Cleaner to traverse rather than recurse child nodes, to avoid the risk of overflowing the stack.
1237 <https://github.com/jhy/jsoup/issues/246>
1238
1239 * Added Element.insertChildren(), to easily insert a list of child nodes at a specific index.
1240 <https://github.com/jhy/jsoup/issues/239>
1241
1242 * Added Node.childNodesCopy(), to create an independent copy of a Node's children.
1243
1244 * When parsing in XML mode, preserve XML declarations (<?xml ... ?>).
1245 <https://github.com/jhy/jsoup/issues/242>
1246
1247 * Introduced Parser.parseXmlFragment(), to allow easy parsing of XML fragments.
1248 <https://github.com/jhy/jsoup/issues/279>
1249
1250 * Allow Safelist test methods to be extended
1251 <https://github.com/jhy/jsoup/issues/85>
1252
1253 * Added Document.OutputSettings.outline mode, to aid HTML debugging by printing out in outline mode, similar to
1254 browser HTML inspectors.
1255 <https://github.com/jhy/jsoup/issues/273>
1256
1257 * When parsing, allow all tags to self-close. Tags that aren't expected to self-close will get an end tag.
1258 <https://github.com/jhy/jsoup/issues/258>
1259
1260 * Fixed an issue when parsing <textarea>/RCData tags containing unescaped closing tags that would drop the trailing >.
1261
1262 * Corrected the javadoc for Element#child() to note that it throws IndexOutOfBounds.
1263 <https://github.com/jhy/jsoup/issues/277>
1264
1265 * When cloning an Element, reset the classnames set so as not to hold a pointer to the source's.
1266 <https://github.com/jhy/jsoup/issues/278>
1267
1268 * Limit how far up the stack the formatting adoption agency algorithm will travel, to prevent the chance of a run-away
1269 parse when the HTML stack is hopelessly deep.
1270 <https://github.com/jhy/jsoup/issues/234>
1271
1272 * Modified Element.text() to build text by traversing child nodes rather than recursing. This avoids stack-overflow
1273 errors when the DOM is very deep and the VM stack-size is low.
1274 <https://github.com/jhy/jsoup/issues/271>
1275
1276 *** Release 1.7.1 [2012-Sep-23]
1277 * Improved parse time, now 2.3x faster than previous release, with lower memory consumption.
1278
1279 * Reduced memory consumption when selecting elements.
1280
1281 * Introduced finer granularity of exceptions in Jsoup.connect, including HttpStatusException and
1282 UnsupportedMimeTypeException.
1283 <https://github.com/jhy/jsoup/issues/229>
1284
1285 * Fixed an issue when determining the Windows-1254 character-set from a meta tag when run in the Turkish locale.
1286 <https://github.com/jhy/jsoup/issues/191>
1287
1288 * Fixed whitespace preservation in <textarea> tags.
1289 <https://github.com/jhy/jsoup/issues/167>
1290
1291 * In jsoup.connect, fail faster if the return content type is not supported.
1292 <https://github.com/jhy/jsoup/issues/153>
1293
1294 * In jsoup.clean, allow custom OutputSettings, to control pretty printing, character set, and entity escaping.
1295 <https://github.com/jhy/jsoup/issues/148>
1296
1297 * Fixed an issue that prevented frameset documents to be cleaned by the Cleaner.
1298 <https://github.com/jhy/jsoup/issues/154>
1299
1300 * Fixed an issue when normalising whitespace for strings containing high-surrogate characters.
1301 <https://github.com/jhy/jsoup/issues/214>
1302
1303 * If a server doesn't specify a content-type header, treat that as OK.
1304 <https://github.com/jhy/jsoup/issues/213>
1305
1306 * If a server returns an unsupported character-set header, attempt to decode the content with the default charset
1307 (UTF8), instead of bailing with an unsupported charset exception.
1308 <https://github.com/jhy/jsoup/issues/215>
1309
1310 * Removed an unnecessary synchronisation in Tag.valueOf, allowing multi-threaded parsing to run faster.
1311 <https://github.com/jhy/jsoup/issues/238>
1312
1313 * Made entity decoding less greedy, so that non-entities are less likely to be incorrectly treated as entities.
1314 <https://github.com/jhy/jsoup/issues/224>
1315
1316 * Whitespace normalise document.title() output.
1317 <https://github.com/jhy/jsoup/issues/168>
1318
1319 * In Jsoup.connection, enforce a connection disconnect after every connect. This precludes keep-alive connections to
1320 the same host, but in practise many implementations will leak connections, particularly on error.
1321
1322 *** Release 1.6.3 [2012-May-28]
1323 * Fixed parsing of group-or commas in CSS selectors, to correctly handle sub-queries containing commas.
1324 <https://github.com/jhy/jsoup/issues/179>
1325
1326 * If a node has no parent, return null on previousSibling and nextSibling instead of throwing a null pointer exception.
1327 <https://github.com/jhy/jsoup/issues/184>
1328
1329 * Updated Node.siblingNodes() and Element.siblingElements() to exclude the current node (a node is not its own sibling).
1330
1331 * Fixed HTML entity parser to correctly parse entities like frac14 (letter + number combo).
1332 <https://github.com/jhy/jsoup/issues/145>
1333
1334 * Fixed issue where contents of a script tag within a comment could be incorrectly parsed.
1335 <https://github.com/jhy/jsoup/issues/115>
1336
1337 * Fixed GAE support: load HTML entities from a file on startup, instead of embedding in the class.
1338
1339 * Fixed NPE when HTML fragment parsing a <style> tag
1340 <https://github.com/jhy/jsoup/issues/189>
1341
1342 * Fixed issue with :all pseudo-tag in HTML sanitizer when cleaning tags previously defined in safelist
1343 <https://github.com/jhy/jsoup/issues/156>
1344
1345 * Fixed NPE in Parser.parseFragment() when context parameter is null.
1346 <https://github.com/jhy/jsoup/issues/195>
1347
1348 * In HTML Safelists, when defining allowed attributes for a tag, automatically add the tag to the allowed list.
1349
1350 *** Release 1.6.2 [2012-Mar-27]
1351 * Added a simplified XML parsing mode, which can usefully parse valid and invalid XML, but does not enforce any HTML
1352 document structure or special tag behaviour.
1353
1354 * Added the optional ability to track errors when tokenising and parsing.
1355
1356 * Added jsoup.connect.cookies(Map) method, to set multiple cookies at once, possibly from a prior request.
1357
1358 * Added Element.textNodes() and Element.dataNodes(), to easily access an element's children text nodes and data nodes.
1359
1360 * Added an example program that demonstrates how to format HTML as plain-text, and the use of the NodeVisitor interface.
1361
1362 * Added Node.traverse() and Elements.traverse() methods, to iterate through a node's descendants.
1363
1364 * Updated jsoup.connect so that when requests made as POSTs are redirected, the redirect is followed as a GET.
1365 <https://github.com/jhy/jsoup/issues/120>
1366
1367 * Updated the Cleaner and Safelists to optionally preserve related links in elements, instead of converting them
1368 to absolute links.
1369
1370 * Updated the Cleaner to support custom allowed protocols such as "cid:" and "data:".
1371 <https://github.com/jhy/jsoup/issues/127>
1372
1373 * Updated handling of <base href> tags, to act on only the first one seen when parsing, to align with modern browsers.
1374
1375 * Updated Node.setBaseUri(), to recursively set on all the node's descendants.
1376
1377 * Fixed handling of null characters within comments.
1378 <https://github.com/jhy/jsoup/issues/121>
1379
1380 * Tweaked escaped entity detection in attributes to not treat &entity_... as an entity form.
1381 <https://github.com/jhy/jsoup/issues/129>
1382
1383 * Fixed doctype tokeniser to allow whitespace between name and public identifier.
1384
1385 * Fixed issue where comments within a table tag would be duplicate-fostered into body.
1386 <https://github.com/jhy/jsoup/pull/165>
1387
1388 * Fixed an issue where a spurious byte-order-mark at the start of a document would cause the parser to miss head
1389 contents.
1390 <https://github.com/jhy/jsoup/issues/134>
1391
1392 * Fixed an issue where content after a frameset could cause a NPE crash. Now correctly implements spec and ignores
1393 the trailing content.
1394 <https://github.com/jhy/jsoup/issues/162>
1395
1396 * Tweaked whitespace checks to align with HTML spec
1397 <https://github.com/jhy/jsoup/pull/175>
1398
1399 * Tweaked HTML output of closing script and style tags to not add an extraneous newline when pretty-printing.
1400
1401 * Substantially reduced default memory allocation within Node.outerHtml, to reduce memory pressure when serialising
1402 smaller DOMs.
1403 <https://github.com/jhy/jsoup/issues/143>
1404
1405 *** Release 1.6.1 [2011-Jul-02]
1406 * Fixed Java 1.5 compatibility.
1407 <https://github.com/jhy/jsoup/issues/103>
1408
1409 * Fixed an issue when parsing <script> tags in body where the tokeniser wouldn't switch to the InScript state, which
1410 meant that data wasn't parsed correctly.
1411 <https://github.com/jhy/jsoup/issues/104>
1412
1413 * Fixed an issue with a missing quote when serialising DocumentType nodes.
1414 <https://github.com/jhy/jsoup/issues/109>
1415
1416 * Fixed issue where a single 0 character was lexed incorrectly as a null character.
1417 <https://github.com/jhy/jsoup/issues/107>
1418
1419 * Fixed normalisation of carriage returns to newlines on input HTML.
1420 <https://github.com/jhy/jsoup/issues/110>
1421
1422 * Disabled memory mapped files when loading files from disk, to improve compatibility in Windows environments.
1423
1424 *** Release 1.6.0 [2011-Jun-13]
1425 * HTML5 conformant parser. Complete reimplementation of HTML tokenisation and parsing, to implement the
1426 http://whatwg.org/html spec. This ensures jsoup parses HTML identically to current modern browsers.
1427
1428 * When parsing files from disk, files are loaded via memory mapping, to increase parse speed.
1429
1430 * Reduced memory overhead and lowered garbage collector pressure with Attribute, Node and Element model optimisations.
1431
1432 * Improved "abs:" absolute URL handling in Elements.attr("abs:href") and Node.hasAttr("abs:href").
1433 <https://github.com/jhy/jsoup/issues/97>
1434
1435 * Fixed cookie handling issue in jsoup.Connect where empty cookies would cause a validation exception.
1436 <https://github.com/jhy/jsoup/issues/87>
1437
1438 * Added jsoup.Connect configuration options to allow HTTP errors to be ignored, and the content-type to be ignored.
1439 Contributed by Jesse Piascik (piascikj)
1440 <https://github.com/jhy/jsoup/pull/78>
1441
1442 * Added Node.before(node) and Node.after(node), to allow existing nodes to be moved, or new nodes to be inserted, into
1443 precise DOM positions.
1444
1445 * Added Node.unwrap() and Elements.unwrap(), to remove a node but keep its contents. Useful for e.g. removing unwanted
1446 formatting tags.
1447 <https://github.com/jhy/jsoup/issues/100>
1448
1449 * Now handles unclosed <title> tags in document by breaking out of the title at the next start tag, instead of
1450 eating up to the end of the document.
1451 <https://github.com/jhy/jsoup/issues/82>
1452
1453 * Added OSGi bundle support to the jsoup package jar.
1454 <https://github.com/jhy/jsoup/issues/98>
1455
1456 *** Release 1.5.2 [2011-Feb-27]
1457 * Fixed issue with selector parser where some boolean AND + OR combined queries (e.g. "meta[http-equiv], meta[content]")
1458 were being parsed incorrectly as OR only queries (e.g. former as "meta, [http-equiv], meta[content]")
1459
1460 * Fixed issue where a content-type specified in a meta tag may not be reliably detected, due to the above issue.
1461
1462 * Updated Element.text() and Element.ownText() methods to ensure <br> tags output as whitespace.
1463
1464 * Tweaked Element.outerHtml() method to not generate initial newline on first output element.
1465
1466 *** Release 1.5.1 [2011-Feb-19]
1467
1468 * Integrated new single-pass selector evaluators, contributed by knz (Anton Kazennikov). This significantly speeds up
1469 the execution of combined selector queries.
1470
1471 * Implemented workaround to fix Scala support. Contributed by bbeck (Brandon Beck).
1472
1473 * Added ability to change an element's tag with Element.tagName(String), and to change many at once
1474 with Elements.tagName(String).
1475
1476 * Added Node.wrap(html), Node.before(html), and Node.after(html), to allow HTML to be easily added to all nodes. These
1477 functions were previously supported on Elements only.
1478
1479 * Added TextNode.splitText(index), which allows a text node to be split into two nodes at a specified index point.
1480 This is convenient if you need to surround some text in an element.
1481
1482 * Updated Jsoup.Connection so that cookies set on a redirect response will be included on both the redirected request
1483 and response.
1484
1485 * Infinite redirection loops in Jsoup.Connect are now prevented.
1486
1487 * Allow Jsoup.Connect to parse application/xml and application/xhtml+xml responses.
1488
1489 * Modified Jsoup.Connect to always follow relative links, regardless of the underlying HTTP sub-system.
1490
1491 * Defined U (underline) element as an inline tag.
1492
1493 * Force strict entity matching (must be &xxx; and not &xxx) in element attributes.
1494
1495 * Implemented clone method for Elements (contributed by knz).
1496
1497 * Fixed tokeniser optimisation when scanning for missing data element close tags.
1498
1499 * Fixed issue when using descendant regex attribute selectors.
1500
1501 *** Release 1.4.1 [2010-Nov-23]
1502
1503 * Added ability to load and parse HTML from an input stream.
1504
1505 * Implemented Node.clone() to create deep, independent copies of Nodes, Elements, and Documents.
1506
1507 * Added :not() selector, to find elements that do not match the selector. E.g. div:not(.logo) finds divs that
1508 do not have the "logo" class name.
1509
1510 * Added Elements.not(selector) method, to remove undesired results from selector results.
1511
1512 * Implemented DataNode.setWholeData() to allow updating of script and style data contents.
1513
1514 * Relaxed parse rules of H1 - H6, to allow nested content. This is against spec, but matches browser and publisher
1515 behaviour.
1516
1517 * Relaxed parse rule of SPAN to treat as block, to allow nested block content.
1518
1519 * Fixed issue in jsoup.connect when extracting character set from content-type header; now supports quoted
1520 charset declaration.
1521
1522 * Fixed support for jsoup.connect to follow redirects between http & https URLs.
1523
1524 * Document normalisation now more enthusiastically enforces the correct document structure.
1525
1526 * Support node.outerHtml() method when node has no parent (e.g. when it has been removed from its DOM tree)
1527
1528 * Fixed support for HTML entities with numbers in name (e.g. &frac34, &sup1).
1529
1530 * Fixed absolute URL generation from relative URLs which are only query strings.
1531
1532 *** Release 1.3.3 [2010-Sep-19]
1533 * Implemented Elements.empty() and Elements.remove(). This allows easy element removal, like:
1534 doc.select("iframe").remove();
1535
1536 * Fixed issue in Entities when unescaping &#36; ("$")
1537 <http://github.com/jhy/jsoup/issues/issue/34>
1538
1539 * Added restricted XHTML output entity option
1540 <http://github.com/jhy/jsoup/issues/issue/35>
1541
1542 *** Release 1.3.2 [2010-Aug-30]
1543 * Treat HTTP headers as case insensitive in Jsoup.Connection. Improves compatibility for HTTP responses.
1544
1545 * Improved malformed table parsing by implementing ignorable end tags.
1546
1547 *** Release 1.3.1 [2010-Aug-23]
1548 * Removed dependency on Apache Commons-lang. Jsoup now has no external dependencies.
1549
1550 * Added new Connection implementation, to enable easier and richer HTTP requests that parse to Documents. This includes
1551 support for gzip responses, cookies, headers, data parameters, user-agent, referrer, etc.
1552
1553 * Added Element.ownText() method, to get only the direct text of an element, not including the text of its children.
1554
1555 * Added support for selectors :containsOwn(text) and :matchesOwn(regex), to supplement Element.ownText().
1556
1557 * Added support for non-pretty-printed HTML output, to more closely mirror the input HTML.
1558
1559 * Further speed optimisations for parsing and output generation.
1560
1561 * Fixed support for case-sensitive HTML escape entities.
1562 <http://github.com/jhy/jsoup/issues/issue/31>
1563
1564 * Fixed issue when parsing tags with keyless attributes.
1565 <http://github.com/jhy/jsoup/issues/issue/32>
1566
1567 *** Release 1.2.3 [2010-Aug-04]
1568 * Added support for automatic input character set detection and decoding. Jsoup now automatically detects the encoding
1569 character set when parsing HTML from a File or URL. The parser checks the content-type header, then the
1570 <meta http-equiv> or <meta charset> tag, and finally falls back to UTF-8.
1571
1572 * Added ability to configure the document's output charset, to control which characters are HTML escaped, and which
1573 are kept intact. The output charset defaults to the document's input charset. This simplifies non-ascii output.
1574
1575 * Added full support for all new HTML5 tags.
1576
1577 * Added support for HTML5 dataset custom data attributes, with the Element.dataset() map.
1578
1579 * Added support for the [^attributePrefix] selector query, to find elements with attributes starting with a prefix.
1580 Useful for finding elements with datasets: [^data-] matches <p data-name="jsoup">
1581
1582 * Added support for namespaced elements (<fb:name>) and selectors to find them (fb|name)
1583
1584 * Implemented Node.ownerDocument DOM method
1585
1586 * Improved implicit table element handling (particularly around thead, tbody, and tfoot).
1587
1588 * Improved HTML output format for empty elements and auto-detected self closing tags
1589
1590 * Changed DT & DD tags to block-mode tags, to follow practice over spec
1591
1592 * Added support for tag names with - and _ (<abc_foo>, <abc-foo>)
1593
1594 * Handle tags with internal trailing space (<foo >)
1595
1596 * Fixed support for character class regular expressions in [attr=~regex] selector
1597
1598 *** Release 1.2.2 [2010-Jul-11]
1599
1600 * Performance optimisation:
1601 - core HTML parser engine now 3.5 times faster
1602 - HTML generator now 2.5 times faster
1603 - much lower memory use and garbage collection time
1604
1605 * Added support for :matches(regex) selector, to find elements containing text matching regular expression
1606
1607 * Added support for [key~=regex] attribute selector, to find elements with attribute values matching regular expression
1608
1609 * Upgraded the selector query parser to allow nested selectors like 'div:has(p:matches(regex))'
1610
1611 *** Release 1.2.1 [2010-Jun-21]
1612 * Added .before(html) and .after(html) methods to Element and Elements, to insert sibling HTML
1613
1614 * Added :contains(text) selector, to search for elements containing the specified text
1615
1616 * Added :has(selector) pseudo-selector
1617 <http://github.com/jhy/jsoup/issues/issue/20>
1618
1619 * Added Element#parents and Elements#parents to retrieve an element's ancestor chain
1620 <http://github.com/jhy/jsoup/issues/issue/20>
1621
1622 * Fixes an issue where appending / prepending rows to a table (or to similar implicit
1623 element structures) would create a redundant wrapping elements
1624 <http://github.com/jhy/jsoup/issues/issue/21>
1625
1626 * Improved implicit close tag heuristic detection when parsing malformed HTML
1627
1628 * Fixes an issue where text content after a script (or other data-node) was
1629 incorrectly added to the data node.
1630 <http://github.com/jhy/jsoup/issues/issue/22>
1631
1632 * Fixes an issue where text order was incorrect when parsing pre-document
1633 HTML.
1634 <http://github.com/jhy/jsoup/issues/issue/23>
1635
1636 *** Release 1.1.1 [2010-Jun-08]
1637 * Added selector support for :eq, :lt, and :gt
1638 <http://github.com/jhy/jsoup/issues/issue/16>
1639
1640 * Added TextNode#text and TextNode#text(String)
1641 <http://github.com/jhy/jsoup/issues/issue/18>
1642
1643 * Throw exception if trying to parse non-text content
1644 <http://github.com/jhy/jsoup/issues/issue/17>
1645
1646 * Added Node#remove and Node#replaceWith
1647 <http://github.com/jhy/jsoup/issues/issue/19>
1648
1649 * Allow _ and - in CSS ID selectors (per CSS spec).
1650 <http://github.com/jhy/jsoup/issues/issue/10>
1651
1652 * Relative links are resolved to absolute when cleaning, to normalize
1653 output and to verify safe protocol. (Were previously discarded.)
1654 <http://github.com/jhy/jsoup/issues/issue/12>
1655
1656 * Allow combinators at start of selector query, for query refinements
1657 <http://github.com/jhy/jsoup/issues/issue/13>
1658
1659 * Added Element#val() and #val(String) methods, for form values
1660 <http://github.com/jhy/jsoup/issues/issue/14>
1661
1662 * Changed textarea contents to parse as TextNodes, not DataNodes,
1663 so contents visible to text() (and val(), as treated as form input)
1664
1665 * Fixed support for Java 1.5
1666
1667 *** Release 0.3.1 (2010-Feb-20)
1668 * New features: supports Elements#html(), html(String),
1669 prepend(String), append(String); bulk methods for corresponding
1670 methods in Element.
1671
1672 * New feature: Jsoup.isValid(html, safelist) method for user input
1673 form validation.
1674
1675 * Improved Elements.attr(String) to find first matching element
1676 with attribute.
1677
1678 * Fixed assertion error when cleaning HTML with empty attribute
1679 <http://github.com/jhy/jsoup/issues/issue/7>
1680
1681 *** Release 0.2.2 (2010-Feb-07)
1682 * jsoup packages are now available in the Maven central repository.
1683
1684 * New feature: supports Element#addClass, removeClass, toggleClass;
1685 also collection class methods on Elements.
1686 * New feature: supports Element#wrap(html) and Elements#wrap(html).
1687 * New selector syntax: supports E + F adjacent sibling selector
1688 * New selector syntax: supports E ~ F preceding sibling selector
1689 * New: supports Element#elementSiblingIndex()
1690
1691 * Improved document normalisation.
1692 * Improved HTML string output format (pretty-print)
1693
1694 * Fixed absolute URL resolution issue when a base tag has no href.
1695
1696 *** Release 0.1.2 (2010-Feb-02)
1697 * Fixed unrecognised tag handler to be more permissive
1698 <http://github.com/jhy/jsoup/issues/issue/1>
1699
1700
1701 *** Release 0.1.1 (2010-Jan-31)
1702 * Initial beta release of jsoup