mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #6269 from 3D-I/ticket/16834
[ticket/16834] Fix tag svg invalid in Entity - PHP8
This commit is contained in:
commit
8b597f59ce
1 changed files with 5 additions and 5 deletions
|
@ -195,11 +195,11 @@ class icon extends AbstractExtension
|
|||
$doc = new \DOMDocument();
|
||||
$doc->preserveWhiteSpace = false;
|
||||
|
||||
/**
|
||||
* Suppression is needed as DOMDocument does not like HTML5 and SVGs.
|
||||
* Options parameter prevents $dom->saveHTML() from adding an <html> element.
|
||||
*/
|
||||
@$doc->loadHTML($code, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||
// Hide html5/svg errors
|
||||
libxml_use_internal_errors(true);
|
||||
|
||||
// Options parameter prevents $dom->saveHTML() from adding an <html> element.
|
||||
$doc->loadHTML($code, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||
|
||||
// Remove any DOCTYPE
|
||||
foreach ($doc->childNodes as $child)
|
||||
|
|
Loading…
Add table
Reference in a new issue