*** Release 1.6.2 [2011-Mar-27]
* Added a simplified XML parsing mode, which can usefully parse valid and invalid XML, but does not enforce any HTML
document structure or special tag behaviour.
* Added the optional ability to track errors when tokenising and parsing.
* Added jsoup.connect.cookies(Map) method, to set multiple cookies at once, possibly from a prior request.
* Added Element.textNodes() and Element.dataNodes(), to easily access an element's children text nodes and data nodes.
* Added an example program that demonstrates how to format HTML as plain-text, and the use of the NodeVisitor interface.
* Added Node.traverse() and Elements.traverse() methods, to iterate through a node's descendants.
* Updated jsoup.connect so that when requests made as POSTs are redirected, the redirect is followed as a GET.
* Updated the Cleaner and whitelists to optionally preserve related links in elements, instead of converting them
to absolute links.
* Updated the Cleaner to support custom allowed protocols such as "cid:" and "data:".
* Updated handling of <base href> tags, to act on only the first one seen when parsing, to align with modern browsers.
* Updated Node.setBaseUri(), to recursively set on all the node's descendants.
* Fixed handling of null characters within comments.
* Tweaked escaped entity detection in attributes to not treat &entity_... as an entity form.
* Fixed doctype tokeniser to allow whitespace between name and public identifier.
* Fixed issue where comments within a table tag would be duplicate-fostered into body.
* Fixed an issue where a spurious byte-order-mark at the start of a document would cause the parser to miss head
* Fixed an issue where content after a frameset could cause a NPE crash. Now correctly implements spec and ignores
the trailing content.
* Tweaked whitespace checks to align with HTML spec
* Tweaked HTML output of closing script and style tags to not add an extraneous newline when pretty-printing.
* Substantially reduced default memory allocation within Node.outerHtml, to reduce memory pressure when serialising
*** Release 1.6.1 [2011-Jul-02]
* Fixed Java 1.5 compatibility.
* Fixed an issue when parsing <script> tags in body where the tokeniser wouldn't switch to the InScript state, which
meant that data wasn't parsed correctly.
* Fixed an issue with a missing quote when serialising DocumentType nodes.
* Fixed issue where a single 0 character was lexed incorrectly as a null character.
* Fixed normalisation of carriage returns to newlines on input HTML.
* Disabled memory mapped files when loading files from disk, to improve compatibility in Windows environments.
*** Release 1.6.0 [2011-Jun-13]
* HTML5 conformant parser. Complete reimplemenation of HTML tokenisation and parsing, to implement the
http://whatwg.org/html spec. This ensures jsoup parses HTML identically to current modern browsers.
* When parsing files from disk, files are loaded via memory mapping, to increase parse speed.
* Reduced memory overhead and lowered garbage collector pressure with Attribute, Node and Element model optimisations.
* Improved "abs:" absolute URL handling in Elements.attr("abs:href") and Node.hasAttr("abs:href").
* Fixed cookie handling issue in jsoup.Connect where empty cookies would cause a validation exception.
* Added jsoup.Connect configuration options to allow HTTP errors to be ignored, and the content-type to be ignored.
Contributed by Jesse Piascik (piascikj)
* Added Node.before(node) and Node.after(node), to allow existing nodes to be moved, or new nodes to be inserted, into
precise DOM positions.
* Added Node.unwrap() and Elements.unwrap(), to remove a node but keep its contents. Useful for e.g. removing unwanted
* Now handles unclosed <title> tags in document by breaking out of the title at the next start tag, instead of
eating up to the end of the document.
* Added OSGi bundle support to the jsoup package jar.
*** Release 1.5.2 [2011-Feb-27]
* Fixed issue with selector parser where some boolean AND + OR combined queries (e.g. "meta[http-equiv], meta[content]")
were being parsed incorrectly as OR only queries (e.g. former as "meta, [http-equiv], meta[content]")
* Fixed issue where a content-type specified in a meta tag may not be reliably detected, due to the above issue.
* Updated Element.text() and Element.ownText() methods to ensure <br> tags output as whitespace.
* Tweaked Element.outerHtml() method to not generate initial newline on first output element.
*** Release 1.5.1 [2011-Feb-19]
* Integrated new single-pass selector evaluators, contributed by knz (Anton Kazennikov). This significantly speeds up
the execution of combined selector queries.
* Implemented workaround to fix Scala support. Contributed by bbeck (Brandon Beck).
* Added ability to change an element's tag with Element.tagName(String), and to change many at once
* Added Node.wrap(html), Node.before(html), and Node.after(html), to allow HTML to be easily added to all nodes. These
functions were previously supported on Elements only.
* Added TextNode.splitText(index), which allows a text node to be split into two nodes at a specified index point.
This is convenient if you need to surround some text in an element.
* Updated Jsoup.Connection so that cookies set on a redirect response will be included on both the redirected request
* Infinite redirection loops in Jsoup.Connect are now prevented.
* Allow Jsoup.Connect to parse application/xml and application/xhtml+xml responses.
* Modified Jsoup.Connect to always follow relative links, regardless of the underlying HTTP sub-system.
* Defined U (underline) element as an inline tag.
* Force strict entity matching (must be &xxx; and not &xxx) in element attributes.
* Implemented clone method for Elements (contributed by knz).
* Fixed tokeniser optimisation when scanning for missing data element close tags.
* Fixed issue when using descendant regex attribute selectors.
*** Release 1.4.1 [2010-Nov-23]
* Added ability to load and parse HTML from an input stream.
* Implemented Node.clone() to create deep, independent copies of Nodes, Elements, and Documents.
* Added :not() selector, to find elements that do not match the selector. E.g. div:not(.logo) finds divs that
do not have the "logo" class name.
* Added Elements.not(selector) method, to remove undesired results from selector results.
* Implemented DataNode.setWholeData() to allow updating of script and style data contents.
* Relaxed parse rules of H1 - H6, to allow nested content. This is against spec, but matches browser and publisher
* Relaxed parse rule of SPAN to treat as block, to allow nested block content.
* Fixed issue in jsoup.connect when extracting character set from content-type header; now supports quoted
* Fixed support for jsoup.connect to follow redirects between http & https URLs.
* Document normalisation now more enthusiastically enforces the correct document structure.
* Support node.outerHtml() method when node has no parent (e.g. when it has been removed from its DOM tree)
* Fixed support for HTML entities with numbers in name (e.g. ¾, ¹).
* Fixed absolute URL generation from relative URLs which are only query strings.
*** Release 1.3.3 [2010-Sep-19]
* Implemented Elements.empty() and Elements.remove(). This allows easy element removal, like:
* Fixed issue in Entities when unescaping $ ("$")
* Added restricted XHTML output entity option
*** Release 1.3.2 [2010-Aug-30]
* Treat HTTP headers as case insensitive in Jsoup.Connection. Improves compatibility for HTTP responses.
* Improved malformed table parsing by implementing ignorable end tags.
*** Release 1.3.1 [2010-Aug-23]
* Removed dependency on Apache Commons-lang. Jsoup now has no external dependencies.
* Added new Connection implementation, to enable easier and richer HTTP requests that parse to Documents. This includes
support for gzip responses, cookies, headers, data parameters, user-agent, referrer, etc.
* Added Element.ownText() method, to get only the direct text of an element, not including the text of its children.
* Added support for selectors :containsOwn(text) and :matchesOwn(regex), to supplement Element.ownText().
* Added support for non-pretty-printed HTML output, to more closely mirror the input HTML.
* Further speed optimisations for parsing and output generation.
* Fixed support for case-sensitive HTML escape entities.
* Fixed issue when parsing tags with keyless attributes.
*** Release 1.2.3 [2010-Aug-04]
* Added support for automatic input character set detection and decoding. Jsoup now automatically detects the encoding
character set when parsing HTML from a File or URL. The parser checks the content-type header, then the
<meta http-equiv> or <meta charset> tag, and finally falls back to UTF-8.
* Added ability to configure the document's output charset, to control which characters are HTML escaped, and which
are kept intact. The output charset defaults to the document's input charset. This simplifies non-ascii output.
* Added full support for all new HTML5 tags.
* Added support for HTML5 dataset custom data attributes, with the Element.dataset() map.
* Added support for the [^attributePrefix] selector query, to find elements with attributes starting with a prefix.
Useful for finding elements with datasets: [^data-] matches <p data-name="jsoup">
* Added support for namespaced elements (<fb:name>) and selectors to find them (fb|name)
* Implemented Node.ownerDocument DOM method
* Improved implicit table element handling (particularly around thead, tbody, and tfoot).
* Improved HTML output format for empty elements and auto-detected self closing tags
* Changed DT & DD tags to block-mode tags, to follow practice over spec
* Added support for tag names with - and _ (<abc_foo>, <abc-foo>)
* Handle tags with internal trailing space (<foo >)
* Fixed support for character class regular expressions in [attr=~regex] selector
*** Release 1.2.2 [2010-Jul-11]
* Performance optimisation:
- core HTML parser engine now 3.5 times faster
- HTML generator now 2.5 times faster
- much lower memory use and garbage collection time
* Added support for :matches(regex) selector, to find elements containing text matching regular expression
* Added support for [key~=regex] attribute selector, to find elements with attribute values matching regular expression
* Upgraded the selector query parser to allow nested selectors like 'div:has(p:matches(regex))'
*** Release 1.2.1 [2010-Jun-21]
* Added .before(html) and .after(html) methods to Element and Elements, to insert sibling HTML
* Added :contains(text) selector, to search for elements containing the specified text
* Added :has(selector) pseudo-selector
* Added Element#parents and Elements#parents to retrieve an element's ancestor chain
* Fixes an issue where appending / prepending rows to a table (or to similar implicit
element structures) would create a redundant wrapping elements
* Improved implicit close tag heuristic detection when parsing malformed HTML
* Fixes an issue where text content after a script (or other data-node) was
incorrectly added to the data node.
* Fixes an issue where text order was incorrect when parsing pre-document
*** Release 1.1.1 [2010-Jun-08]
* Added selector support for :eq, :lt, and :gt
* Added TextNode#text and TextNode#text(String)
* Throw exception if trying to parse non-text content
* Added Node#remove and Node#replaceWith
* Allow _ and - in CSS ID selectors (per CSS spec).
* Relative links are resolved to absolute when cleaning, to normalize
output and to verify safe protocol. (Were previously discarded.)
* Allow combinators at start of selector query, for query refinements
* Added Element#val() and #val(String) methods, for form values
* Changed textarea contents to parse as TextNodes, not DataNodes,
so contents visible to text() (and val(), as treated as form input)
* Fixed support for Java 1.5
*** Release 0.3.1 (2010-Feb-20)
* New features: supports Elements#html(), html(String),
prepend(String), append(String); bulk methods for corresponding
methods in Element.
* New feature: Jsoup.isValid(html, whitelist) method for user input
* Improved Elements.attr(String) to find first matching element
* Fixed assertion error when cleaning HTML with empty attribute
*** Release 0.2.2 (2010-Feb-07)
* jsoup packages are now available in the Maven central repository.
* New feature: supports Element#addClass, removeClass, toggleClass;
also collection class methods on Elements.
* New feature: supports Element#wrap(html) and Elements#wrap(html).
* New selector syntax: supports E + F adjacent sibling selector
* New selector systax: supports E ~ F preceding sibling selector
* New: supports Element#elementSiblingIndex()
* Improved document normalisation.
* Improved HTML string output format (pretty-print)
* Fixed absolute URL resolution issue when a base tag has no href.
*** Release 0.1.2 (2010-Feb-02)
* Fixed unrecognised tag handler to be more permissive
*** Release 0.1.1 (2010-Jan-31)
* Initial beta release of jsoup