Do not use tidy extension by default

- Fix reply to some emails do no open compose dialog
This commit is contained in:
Hadi Nategh 2015-11-24 15:35:43 +00:00
parent 90b1bcc03c
commit 1bbf423c1e

View File

@ -2145,13 +2145,21 @@ class mail_compose
}
static function _getCleanHTML($_body)
/**
* HTML cleanup
*
* @param type $_body message
* @param type $_useTidy = false, if true tidy extention will be loaded and tidy will try to clean body message
* since the tidy causes segmentation fault ATM, we set the default to false.
* @return type
*/
static function _getCleanHTML($_body, $_useTidy = false)
{
static $nonDisplayAbleCharacters = array('[\016]','[\017]',
'[\020]','[\021]','[\022]','[\023]','[\024]','[\025]','[\026]','[\027]',
'[\030]','[\031]','[\032]','[\033]','[\034]','[\035]','[\036]','[\037]');
if (extension_loaded('tidy'))
if ($_useTidy && extension_loaded('tidy') )
{
$tidy = new tidy();
$cleaned = $tidy->repairString($_body, mail_bo::$tidy_config,'utf8');