Skip to content

Releases: ivopetkov/html5-dom-document-php

v2.0.0

11 Feb 09:31
Compare
Choose a tag to compare

A new major release that better matches the behavior of the native DomDocument related to HTML elements with matching id attributes. DomDocument::loadHTML() throws a warning when loading such HTML code. HTML5DOMDocument::loadHTML() now throws an exception it this case, that can be disabled when providing the HTML5DOMDocument::ALLOW_DUPLICATE_IDS option.

REMOVED:

  • Silent duplicate elements removal in loadHTML() and insertHTML().

ADDED:

  • HTML5DOMDocument::ALLOW_DUPLICATE_IDS to use in loadHTML() to prevent errors for duplicate elements ids.
  • HTML5DOMDocument::modify() to fix and optimize the DOM.

FIXED

  • Parsing complex queries.

Big thanks to ygoe and manychois for their feedback and support.

v1.1.0

31 Oct 07:18
Compare
Choose a tag to compare

Added support for complex selectors ("div, p", div p, div > p, div + p, p ~ ul).
Internal optimizations.

v1.0.3

16 Oct 07:39
Compare
Choose a tag to compare

Fix when using unsupported libxml constants.

v1.0.2

10 Oct 15:25
Compare
Choose a tag to compare

Added support for '.class1.class2' selector.

v1.0.1

24 Aug 13:11
Compare
Choose a tag to compare

Comments update.

v1.0.0

18 Aug 17:13
Compare
Choose a tag to compare

After 2+ years of active development and running on production environments, I'm proud to release v1.0.0 of the library. With the help of some awesome folks we've managed to create the best library (in my opinion) to parse and manipulate HTML5 documents in PHP. Thank you for the support.

Changes from the previous stable version (0.6.*):

  • Added support for LIBXML_HTML_NOIMPLIED and LIBXML_HTML_NODEFDTD options in loadHTML().
  • A new line added after the DOCTYPE for better compatibility with DOMDocument.
  • The LIBXML_NOENT option is now not added by default.

v0.6.1

13 Jul 12:42
Compare
Choose a tag to compare

Removed PSR autoloader from composer.json.

v0.6.0

21 Jun 13:03
Compare
Choose a tag to compare

Added DOMElement::$classList property.

Thanks to manychois for the contributions.

v0.5.10

21 Jun 12:16
Compare
Choose a tag to compare

Added support for multiple attributes selectors (tagname[attr1][attr2], etc.).
Added support for attr~="value", attr|="value", attr^="value", attr$="value", attr*="value" query selectors.
Fix in saveHTML() related to wrong charset values provided.
Added ext-dom requirement in composer.json.

Thanks to Lee Willis for the contributions.

v0.5.9

28 Apr 16:13
86a6e41
Compare
Choose a tag to compare

Added support for custom tags (dashes in the name) in querySelector() and querySelectorAll().

Thanks to bkonetzny for the contributions.