From 095c19b741d152c88d3b38545deca720597549fc Mon Sep 17 00:00:00 2001 From: nadine-shi Date: Mon, 1 Jul 2019 14:53:50 +0300 Subject: [PATCH] Ability to get parsing errors in the log file --- lib/MailSo/Base/HtmlUtils.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/MailSo/Base/HtmlUtils.php b/lib/MailSo/Base/HtmlUtils.php index 27218c6..0298821 100755 --- a/lib/MailSo/Base/HtmlUtils.php +++ b/lib/MailSo/Base/HtmlUtils.php @@ -52,6 +52,13 @@ public static function GetDomFromText($sText, $sHtmlAttrs = '', $sBodyAttrs = '' @$oDom->loadHTML('<'.'?xml version="1.0" encoding="utf-8"?'.'>'. ''.$sText.''); + // Uncomment the following lines to get parsing errors in the log file. + // Add LIBXML_PARSEHUGE as second parametr to loadHTML method if you get "Excessive depth in document: 256 use XML_PARSE_HUGE option" error +// if (\MailSo\Base\Utils::FunctionExistsAndEnabled('libxml_get_errors')) +// { +// \Aurora\System\Api::Log(libxml_get_errors()); +// } + return $oDom; }