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 96b75f7888
commit 474e32db67

View File

@ -1041,8 +1041,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);