Revert using LIBXML_NOBLANKS
- This removed all self-closing tags (img, br, etc...) from HTML sources
This commit is contained in:
parent
66f805a39e
commit
2ab43f94d8
|
@ -589,7 +589,7 @@ class HTML
|
||||||
|
|
||||||
$message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
|
$message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
|
||||||
|
|
||||||
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS);
|
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD);
|
||||||
|
|
||||||
$message = $doc->saveHTML();
|
$message = $doc->saveHTML();
|
||||||
// Remove eventual UTF-8 BOM
|
// Remove eventual UTF-8 BOM
|
||||||
|
@ -598,7 +598,7 @@ class HTML
|
||||||
// Collecting all links
|
// Collecting all links
|
||||||
$urls = self::collectURLs($message);
|
$urls = self::collectURLs($message);
|
||||||
|
|
||||||
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS);
|
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD);
|
||||||
|
|
||||||
self::tagToBBCode($doc, 'html', [], '', '');
|
self::tagToBBCode($doc, 'html', [], '', '');
|
||||||
self::tagToBBCode($doc, 'body', [], '', '');
|
self::tagToBBCode($doc, 'body', [], '', '');
|
||||||
|
|
Loading…
Reference in a new issue