All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.CHANGES Maven / Gradle / Ivy

Go to download

jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

There is a newer version: 1.18.1
Show newest version
jsoup changelog

*** Release 1.10.2 [2017-Jan-02]
 * Improved startup time, particularly on Android, by reducing garbage generation and CPU execution time when loading
   the HTML entity files. About 1.72x faster in this area.

 * Added Element.is(query) to check if an element matches this CSS query.

 * Added new methods to Elements: next(query), nextAll(query), prev(query), prevAll(query) to select next and previous
   element siblings from a current selection, with optional selectors.

 * Added Node.root() to get the topmost ancestor of a Node.

 * Added the new selector :containsData(), to find elements that hold data, like script and style tags.

 * Changed Jsoup.isValid(bodyHtml) to validate that the input contains only body HTML that is safe according to the
   whitelist, and does not include HTML errors. And in the Jsoup.Cleaner.isValid(Document) method, make sure the doc
   only includes body HTML.
   
   

 * In Whitelists, validate that a removed protocol exists before removing said protocol.

 * Allow the Jsoup.Connect thread to be interrupted when reading the input stream; helps when reading from a long stream
   of data that doesn't read timeout.
   

 * Jsoup.Connect now uses a desktop user agent by default. Many developers were getting caught by not specifying the
   user agent, and sending the default 'Java'. That causes many servers to return different content than what they would
   to a desktop browser, and what the developer was expecting.

 * Increased the default connect/read timeout in Jsoup.Connect to 30 seconds.

 * Jsoup.Connect now detects if a header value is actually in UTF-8 vs the HTTP spec of ISO-8859, and converts
   the header value appropriately. This improves compatibility with servers that are configured incorrectly.

 * Bugfix: in Jsoup.Connect, URLs containing non-URL-safe characters were not encoded to URL safe correctly.
   

 * Bugfix: a "SYSTEM" flag in doctype tags would be incorrectly removed.
   

 * Bugfix: removing attributes from an Element with removeAttr() would cause a ConcurrentModificationException.

 * Bugfix: the contents of Comment nodes were not returned by Element.data()

 * Bugfix: if source checked out on Windows with git autocrlf=true, Entities.load would fail because of the \r char.

*** Release 1.10.1 [2016-Oct-23]
 * New feature: added the option to preserve case for tags and/or attributes, with ParseSettings. By default, the HTML
   parser will continue to normalize tag names and attribute names to lower case, and the XML parser will now preserve
   case, according to the relevant spec. The CSS selectors for tags and attributes remain case insensitive, per the CSS
   spec.

 * Improved support for extended HTML entities, including supplemental characters and multiple character references.
   Also reduced memory consumption of the entity tables.
   
   

 * Added support for *|E wildcard namespace selectors.
   

 * Added support for setting multiple connection headers at once with Connection.headers(Map)
   

 * Added support for setting/overriding the response character set in Connection.Response, for cases where the charset
   is not defined by the server, or is defined incorrectly.
   

 * Improved performance of class selectors by reducing memory allocation and garbase collection.
   

 * Improved performance of HTML output by reducing the creation of temporary attribute list iterators.
   

 * Fixed an issue when converting to the W3CDom XML, where valid (but ugly) HTML attribute names containing characters
   like '"' could not be converted into valid XML attribute names. These attribute names are now normalized if possible,
   or not added to the XML DOM.
   

 * Fixed an OOB exception when loading an empty-body URL and parsing with the XML parser.
   

 * Fixed an issue where attribute names starting with a slash would be parsed incorrectly.
   

 * Don't reuse charset encoders from OutputSettings, to make threadsafe.
   

 * Fixed an issue in connections with a requestBody where a custom content-type header could be ignored.
   

*** Release 1.9.2 [2016-May-17]
 * Fixed an issue where tag names that contained non-ascii characters but started with an ascii character
   would cause the parser to get stuck in an infinite loop.
   

 * In XML documents, detect the charset from the XML prolog - 
   

 * Fixed an issue where created XML documents would have an incorrect prolog.
   

 * Fixed an issue where you could not use an attribute selector to find values containing unbalanced braces or
   parentheses.
   

 * Fixed an issue where namespaced tags (like ) would cause Element.cssSelector() to fail.
   

*** Release 1.9.1 [2016-Apr-16]
 * Added support for HTTP and SOCKS request proxies, specifiable per connection.
   

 * Added support for sending plain HTTP request bodies in POST and PUT requests, with Connection.requestBody(String).

 * Added support in Jsoup.Connect for HEAD, OPTIONS, TRACE.
   

 * Added support for HTTP 307 Temporary Redirect (replays posts, if applicable).
   

 * Performance improvements when parsing HTML, particularly for Android Dalvik.

 * Added support for writing HTML into Appendable objects (like OutputStreamWriter), to enable stream serialization.
   

 * Added support for XML namespaces when converting jsoup documents to W3C documents.
   

 * Added support for UTF-16 and UTF-32 character set detection from byte-order-marks (BOM).
   

 * Added support for tags with non-ascii (unicode) letters.
   

 * Added Connection.data(key) to retrieve a data KeyVal by its key. Useful to update form data before submission.

 * Fixed an issue in the Parent selector where it would not match against the root element it was applied to.
   

 * Fix an issue where elements.select(query) would not return every matching element if they had the same content.
   

 * Added not-null validators to Element.appendText() and Element.prependText()
   

 * Fixed an issue when moving moving nodes using Element.insert(index, children) where the sibling index would be set
   incorrectly, leading to the original loads being lost.
   

 * Reverted Node.equals() and Node.hashCode() back to identity (object) comparisons, as deep content inspection
   had negative performance impacts and hashkey stability problems. Functionality replaced with Node.hasSameContent().
   

 * In Jsoup.Connect, if the same header key is seen multiple times, combine their values with a comma per the HTTP RFC,
   instead of keeping just one value. Also fixes an issue where header values could be out of order.
   

*** Release 1.8.3 [2015-Aug-02]
 * Added support for custom boolean attributes.
   

 * When fetching XML URLs, automatically switch to the XML parser instead of the HTML parser.
   

 * Performance improvement on parsing larger HTML pages. On Android KitKat, around 1.7x times faster. On Android
   Lollipop, ~ 1.3x faster. Improvements largely from re-ordering the HtmlTreeBuilder methods based on analysis of
   various websites; also from further memory reduction for nodes with no children, and other tweaks.
   
 * Fixed an issue in Element.getElementSiblingIndex (and related methods) where sibling elements with the same content
   would incorrectly have the same sibling index.
   

 * Fixed an issue where unexpected elements in a badly nested table could be moved to the wrong location in the
   document.
   

 * Fixed an issue where a table nested within a TH cell would parse to an incorrect tree.
   

 * When serializing a document using the XHTML encoding entities, if the character set did not support   chars
   (such as Shift_JIS), the character would be skipped. For visibility, will now always output &xa0; when using XHTML
   encoding entities (as   is not defined), regardless of the output character set.
   

 * Fixed an issue when resolving URLs, if the absolute URL had no path, the relative URL was not normalized correctly.
   Also fixed an issue where connections that were redirected to a relative URL did not have the same normalization
   rules as a URL read from Nodes.absUrl(String).
   

 * When serialising XML, ensure that '<' characters in attributes are escaped, per spec. Not required in HTML.
   

*** Release 1.8.2 [2015-Apr-13]
 * Performance improvements for parsing HTML on Android, of 1.5x to 1.9x, with larger parses getting a bigger
   speed increase. For non-Android JREs, around 1.1x to 1.2x.

 * Dramatic performance improvement in HTML serialization on Android (KitKat and later), of 115x. Improvement by working
   around a character set encoding speed regression in Android.
   

 * Performance improvement for the class name selector on Android (.class) of 2.5x to 14x. Around 1.2x
   on non-Android JREs.

 * File upload support. Added the ability to specify input streams for POST data, which will upload content in
   MIME multipart/form-data encoding.

 * Add a meta-charset element to documents when setting the character set, so that the document's charset is
   unambiguous.
   

 * Added ability to disable TLS (SSL) certificate validation. Helpful if you're hitting a host with a bad cert,
   or your JDK doesn't support SNI.
   

 * Added ability to further tweak the canned Cleaner Whitelists by removing existing settings.
   

 * Added option in Cleaner Whitelist to allow linking to in-page anchors (#)
   

 * Use a lowercase doctype tag for HTML5 documents.

 * Add support for 201 Created with redirect, and other status codes. Treats any HTTP status code 2xx or 3xx as an OK
   response, and follow redirects whenever there is a Location header.
   

 * Added support for HTTP method verbs PUT, DELETE, and PATCH.

 * Added support for overriding the default POST character of UTF-8
   

 * W3C DOM support: added ability to convert from a jsoup document to a W3C document, with the W3Dom helper class.

 * In the HtmlToPlainText example program, added the ability to filter using a CSS selector. Also clarified
   the usage documentation.

 * Fixed validation of cookie names in HttpConnection cookie methods.
   

 * Fixed an issue where