Skip to content

css4j v3.1.0

Choose a tag to compare

@carlosame carlosame released this 22 Oct 19:14
· 168 commits to master since this release
  • Previous versions are vulnerable to DoS attacks, and the new protections use the new CSSDocument.isAuthorizedOrigin(URL) method.
  • The method ErrorHandler.hasErrors() now returns true if there are I/O errors. Those errors were previously considered transient, and therefore weren't appearing there.
  • DOM: DOMDocument.getDomConfig() was undeprecated, and the DOMConfiguration can be used to control the normalization of the document.
  • DOM: on attribute nodes, getTextContent() now returns the attribute value instead of the empty string.
  • DOM: DOM nodes now implement java.io.Serializable.
  • DefaultEntityResolver.resolveEntity(DocumentTypeDeclaration) is deprecated.

("DOM:" means that the change applies to "Native DOM implementation").

These new behaviors mean that this release is not fully backwards-compatible with 3.0, so the minor version was bumped to 3.1. Additionally, the following are important fixes/improvements:

  • Case sensitivity fixes: Native DOM correctly matched the selector [Foo] to the attribute foo="bar" in HTML documents, but neither the XML-oriented DOM implementations in the DOM wrapper nor the DOM4J back-end did. Now they both do, and a few other smaller case sensitivity fixes were applied as well.
  • DOM: normalization of element-content whitespace is now based on the value of the whitespace CSS property, and so does DOMWriter serialization.
  • DOM: indented serialization of inline-block elements in DOMWriter.