- π¬π§United Kingdom catch
+++ b/core/lib/Drupal/Component/Utility/Html.php @@ -345,17 +345,16 @@ public static function serialize(\DOMDocument $document) { + $data = $child_node->data; + if (strpos($child_node->data, 'CDATA') === FALSE) { + $embed_prefix = "\n{$comment_start}<![CDATA[{$comment_end}\n";
Can this be !str_contains() now?
The issue summary could use an update, I'm also wondering whether the current test coverage covers the nesting case that's in the issue summary.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The existing test method
\Drupal\Tests\filter\Kernel\FilterKernelTest::testHtmlCorrectorFilter
is testing\Drupal\Component\Utility\Html::normalize
but none of the existing or new cases call Html::normalize twice per the originally reported issue.So I think we should add an extra test case that does that.
I think we should also open a follow up to move that test coverage out of the filter module, into the Utility component, it doesn't use any filter features.
- Status changed to Needs review
over 1 year ago 1:43pm 5 April 2023 - πΊπΈUnited States smustgrave
Opened [#3352404
Added another assertion that calls normalize() twice.
- Status changed to RTBC
over 1 year ago 12:02pm 22 April 2023 - π§πͺBelgium borisson_ Mechelen, π§πͺ
This looks great, great test coverage!
- last update
over 1 year ago 29,302 pass - last update
over 1 year ago 29,304 pass - last update
over 1 year ago 29,343 pass - last update
over 1 year ago 29,366 pass - last update
over 1 year ago 29,366 pass - last update
over 1 year ago 29,371 pass - Status changed to Fixed
over 1 year ago 7:44pm 16 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.