Skip to content

Releases: webfactory/dom

Re-arrange file structure to avoid empty PSR-4 namespace prefix

Choose a tag to compare

@mpdude mpdude released this 28 Jan 15:20
d2e2621

What's Changed

  • Re-arrange file structure to avoid empty PSR-4 namespace prefix by @mpdude in #16

Full Changelog: 1.2.0...1.2.1

Allow PHP 8.4 to be used, raise minimum PHP requirement to 8.1

Choose a tag to compare

@mpdude mpdude released this 18 Nov 10:29
41569fd

What's Changed

  • Upgrade to PHPUnit 10, allow PHP 8.4 to be used by @mpdude in #14
  • Update the test matrix to cover PHP 8.1 to PHP 8.4 by @mpdude in #15

Full Changelog: 1.1.0...1.2.0

Allow PHP 8.3 to be used

Choose a tag to compare

@mpdude mpdude released this 29 Aug 14:51
298d645
1.1.0

Allow PHP 8.3 to be used

Allow tag names to contain hyphens

Choose a tag to compare

@mpdude mpdude released this 29 Aug 13:23
e402b7d
Fix that element names may contain dashes

`<h-include>` is a valid name, and in case of a self-closing usage the `fixDump()` method would mutilate the XML output.

Use old namespace reconciliation #8

Choose a tag to compare

@MalteWunsch MalteWunsch released this 28 Oct 09:49
de3cc3a

What's Changed

New Contributors

Full Changelog: 1.0.27...1.0.28

Avoid html: prefixes being added in PHP >= 8.1.21

Choose a tag to compare

@sebastiankugler sebastiankugler released this 12 Jul 10:52
d760f5b

The update to PHP 8.1.21 apparently changes the search order for defined namespaces during the process of reconciliation, resulting in finding the namespace having the prefix 'html' prior to the default one without prefix, as the search seems to start from the last defined prefix now. This results in DOMElements getting an unwanted html: namespace prefix while being appended to another element using appendChild() e.g. in BaseParsingHelper::dump().

This release changes the order in which namespaces are defined to avoid the html: prefix being added.

Support character references for <, >, &, " and ' (#5)

Choose a tag to compare

@mpdude mpdude released this 15 Jun 13:05
296711b
Support character references for &, <, >, ' and " (#5)

Polyglot HTML 5 markup (i. e. HTML 5 written in a way to be valid XML) only uses very few named entity references:

> Polyglot markup uses only the following named entity references:
> amp lt gt apos quot

https://www.w3.org/TR/html-polyglot/#named-entity-references

To support working with content that has been created before HTML5 – that is, XHTML1 – we substitute all named and character references with their plain values, which should not pose a problem in UTF-8 content. Only `&amp;`, `&lt;`, `&gt;`, `&quot;` and `&apos;` shall be kept.

We missed, however, that e. g. `&amp;` can also be written as `&#38;`; similar for the other characters. This PR adds support for these cases as well.

Prevent changing the XML namespace on <svg> elements

Choose a tag to compare

@mpdude mpdude released this 26 Jun 08:31
649ce86
Merge pull request #3 from webfactory/avoid-svg-namespace-reconciliation

Work around libxml2 namespace reconciliation for SVG elements in HTML5

Fix a bug with subsequent <esi:...> tags

Choose a tag to compare

@mpdude mpdude released this 07 Oct 21:49
When several <esi:...> directly follow each other, they will all be escaped
in the sanitize() method. However, libxml may choose to re-group the
CDATA sections, that is, after dumping the XML we will only have a
single CDATA section containing all ESI tags.

Thus, when stripping the CDATA section again, we need to be able to handle
more than one contained ESI tag.

Work around a potential regression (libxml 2.9.2 and above)

Choose a tag to compare

@mpdude mpdude released this 24 Nov 13:43

See #2.