Slightly more intelligent detection of plain text fields in a document that has HTML parsing turned on

This commit is contained in:
nathangray 2016-07-28 14:14:20 -06:00
parent 2e838983ca
commit 588862d150

View File

@ -1039,8 +1039,9 @@ abstract class Merge
$value = preg_replace('/&[^; ]+;/','',$value);
}
}
if(!$this->parse_html_styles)
if(!$this->parse_html_styles || (
strpos($value, "\n") !== FALSE && strpos($value,'<br') === FALSE && strpos($value, '<span') === FALSE
))
{
// Encode special chars so they don't break the file
$value = htmlspecialchars($value,ENT_NOQUOTES);