Skip to content

Commit a541489

Browse files
authored
DOC-3147: DomParser no longer tries to fix some nodes when parsed with a context, and Improved structure retention when inserting invalid HTML fragments. (#3779)
1 parent 7c356cd commit a541489

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ This behavior is now enabled by default, but can be disabled by setting `pagebre
286286

287287
For more information on the `pagebreak_split_block` option, see xref:pagebreak.adoc#pagebreak_split_block[pagebreak_split_block].
288288

289+
=== DomParser no longer tries to fix some nodes when parsed with a context
290+
// #TINY-8205
291+
292+
Previously, the `DomParser` would attempt to fix invalid HTML structures when parsing with a context, such as when inserting content into a specific element. This behavior lead to unexpected results, especially when the structure was not valid in the context of the parent element.
293+
294+
In {productname} {release-version}, the `DomParser` has been updated to no longer attempt to fix invalid nodes when parsing with a context. Instead, it will validate the nodes and only insert them if they are valid in the context of their parent element. If the nodes are invalid, they will not be inserted.
295+
296+
289297
[[removed]]
290298
== Removed
291299

@@ -392,6 +400,13 @@ Previously, applying different font sizes to nested elements could result in inc
392400

393401
{productname} {release-version} introduces a fix that ensures line heights are calculated based on the font size visible in the new line, rather than inheriting line-height from parent element. This means that when different font sizes are applied within the same content, the line heights will be consistent and proportional to the visible font size.
394402

403+
=== Improved structure retention when inserting invalid HTML fragments
404+
// #TINY-8205
405+
406+
Previously, when inserting HTML fragments through APIs or pasting, the parser would attempt to fix invalid structures, which could lead to the loss of valid structures like tables and lists. This behavior was inconsistent and could result in unexpected outcomes when handling complex HTML content.
407+
408+
In {productname} {release-version}, the parser has been updated to improve the retention of structures when inserting HTML fragments. It now validates these fragments in the context of their parent structure, ensuring that valid structures are preserved even if the fragment contains invalid HTML resulting in more predictable and desirable outcomes when handling complex HTML content.
409+
395410

396411
[[security-fixes]]
397412
== Security fixes

0 commit comments

Comments
 (0)