Releases: webfactory/dom
Releases · webfactory/dom
Re-arrange file structure to avoid empty PSR-4 namespace prefix
What's Changed
Full Changelog: 1.2.0...1.2.1
Allow PHP 8.4 to be used, raise minimum PHP requirement to 8.1
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
1.1.0 Allow PHP 8.3 to be used
Allow tag names to contain hyphens
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
What's Changed
- Use old namespace reconciliation behaviour in PHP > 8.1.24 by @sebastiankugler in #8
New Contributors
- @sebastiankugler made their first contribution in #8
Full Changelog: 1.0.27...1.0.28
Avoid html: prefixes being added in PHP >= 8.1.21
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)
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 `&`, `<`, `>`, `"` and `'` shall be kept. We missed, however, that e. g. `&` can also be written as `&`; similar for the other characters. This PR adds support for these cases as well.
Prevent changing the XML namespace on <svg> elements
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
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.