Author: nathangray
New Revision: 55618
URL: http://svn.stylite.de/viewvc/egroupware?rev=55618&view=rev
Log:
Avoid double encoding when not parsing html styles
Modified:
trunk/etemplate/inc/class.bo_merge.inc.php
— trunk/etemplate/inc/class.bo_merge.inc.php (original)
+++ trunk/etemplate/inc/class.bo_merge.inc.php Mon Apr 4 22:57:01 2016
@@ -204,7 +204,7 @@
$contact = $this->contacts->read($contact, $ignore_acl);
}
if (!is_array($contact)) return array();
@@ -1012,7 +1012,7 @@
continue;
}
// decode html entities back to utf-8
-
if (is_string($value) && (strpos($value,'&') !== false) && $this->parse_html_styles)
{
$value = html_entity_decode($value,ENT_QUOTES,$charset);
@@ -1118,7 +1118,10 @@
}
// now decode &, < and >, which need to be encoded as entities in xml
// Check for encoded >< getting double-encoded
-
$replacements = str_replace(array('&',"\r","\n",'&lt;','&gt;'),array('&','',$break,'<','>'),$replacements);
-
if($this->parse_html_styles)
-
{
-
$replacements = str_replace(array('&',"\r","\n",'&lt;','&gt;'),array('&','',$break,'<','>'),$replacements);
-
}
}
if ($mimetype == 'application/x-yaml')
{
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs