Skip to content

Commit

Permalink
Ability to get parsing errors in the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
nadine-belanova committed Jul 1, 2019
1 parent a739519 commit 095c19b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/MailSo/Base/HtmlUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public static function GetDomFromText($sText, $sHtmlAttrs = '', $sBodyAttrs = ''
@$oDom->loadHTML('<'.'?xml version="1.0" encoding="utf-8"?'.'>'.
'<html '.$sHtmlAttrs.'><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body '.$sBodyAttrs.'>'.$sText.'</body></html>');

// 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;
}

Expand Down

0 comments on commit 095c19b

Please sign in to comment.