- Issue created by @emptyvoid
- πΊπΈUnited States emptyvoid
Attempting to create a batch with 8.x-dev the repository doesn't appear actually have all of the code in the official release. So I can't create a patch.
ckeditor_accordion/src/Plugin/Filter/CKEditorAccordion.php
-- Line 60
From// Load the text into a dom object. $dom = new \DOMDocument(); $dom->loadHTML(mb_convert_encoding($text, 'HTML-ENTITIES', 'UTF-8')); $xpath = new \DOMXPath($dom);
to line 60
// Load the text into a dom object. $dom = new \DOMDocument('1.0'); libxml_use_internal_errors(true); $dom->loadHTML(mb_convert_encoding($text, 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); $xpath = new \DOMXPath($dom);
This properly validates the DOM object and suppresses false negatives for invalid entities.
- @emptyvoid opened merge request.
- πΊπΈUnited States emptyvoid
Created a branch with missing source code and fix for this error.
https://git.drupalcode.org/project/ckeditor_accordion/-/merge_requests/8
- π³π±Netherlands llewellyn.dawson
I am also getting this error on version 2.0.3 where we have content with xml language tags.
Warning: DOMDocument::loadHTML(): Attribute xml:lang redefined in Entity, line: 1 in ckeditor_accordion/src/Plugin/Filter/CKEditorAccordion.php on line 61
I have tried the fix from @emptyvoid and it resolves the issue.
Updated from line 59 to 64:
// Load the text into a dom object. $dom = new \DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(mb_convert_encoding($text, 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); $xpath = new \DOMXPath($dom);
- π³π±Netherlands llewellyn.dawson
This issue is caused by the patch for issue 3124167 π Provide an accessible variant Needs review
I have created a updated on the patch that fixes this issue and is available on 3124167 #30 π Provide an accessible variant Needs review
- πΊπΈUnited States emptyvoid
Confirmed llewellyn.dawson on the 2.0-dev branch this patches and suppresses the errors!