- Issue created by @bob.hinrichs
- First commit to issue fork.
- @kevinquillen opened merge request.
- πΊπΈUnited States kevinquillen
Thanks for the detailed report. While I cannot recreate the exact conditions in your scenario, the issue is that drupal-media tag is not a valid HTML tag. I did some reading on this, and the most popular solution I found was to allow it to happen:
https://stackoverflow.com/questions/41844778/php-libxml-nowarning-not-su...
At the top of the method, I am restricting drupal-media tag, always:
// Never include the contents of the following tags. $removeHtmlElements += ['pre', 'code', 'script', 'iframe', 'drupal-media'];
Then added two assertions to an existing test:
$text = "<h1>Foo</h1> <p>Foo test <drupal-media uuid='12345' /></p>"; $text = StringHelper::prepareText($text); $this->assertSame('Foo Foo test', $text); $text = "<h1>Foo</h1> <p>Foo test <drupal-media uuid='12345'>some text</drupal-media></p>"; $text = StringHelper::prepareText($text); $this->assertSame('Foo Foo test', $text);
The test failed with your error message above. After updating StringHelper to both ignore warnings and remove drupal-media manually like the other tags, the tests pass. Hope this helps.
-
kevinquillen β
committed e9e9db9b on 1.0.x
Issue #3358716 by kevinquillen: Deprecated PHP warning for Embeddings...
-
kevinquillen β
committed e9e9db9b on 1.0.x
- Status changed to Fixed
over 1 year ago 1:50pm 23 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.