mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
If we are not processing styles, just encode special characters.
Fixes broken downloads, missing bits if there were <> in the text
This commit is contained in:
parent
452233a9e5
commit
4ebaf56413
@ -1012,7 +1012,8 @@ abstract class bo_merge
|
||||
continue;
|
||||
}
|
||||
// decode html entities back to utf-8
|
||||
if (is_string($value) && (strpos($value,'&') !== false))
|
||||
|
||||
if (is_string($value) && (strpos($value,'&') !== false) && $this->parse_html_styles)
|
||||
{
|
||||
$value = html_entity_decode($value,ENT_QUOTES,$charset);
|
||||
|
||||
@ -1022,8 +1023,13 @@ abstract class bo_merge
|
||||
$value = preg_replace('/&[^; ]+;/','',$value);
|
||||
}
|
||||
}
|
||||
// remove all html tags, evtl. included
|
||||
if (is_string($value) && (strpos($value,'<') !== false))
|
||||
|
||||
if(!$this->parse_html_styles)
|
||||
{
|
||||
// Encode special chars so they don't break the file
|
||||
$value = htmlspecialchars($value,ENT_NOQUOTES);
|
||||
}
|
||||
else if (is_string($value) && (strpos($value,'<') !== false))
|
||||
{
|
||||
// Clean HTML, if it's being kept
|
||||
if($replace_tags && extension_loaded('tidy')) {
|
||||
|
Loading…
Reference in New Issue
Block a user