forked from extern/egroupware
Use 'utf-8' (instead of utf8) as the encoding, it seems to solve any encoding issues
This commit is contained in:
parent
67d7615ecc
commit
d71b807b8f
@ -63,7 +63,8 @@ abstract class bo_merge
|
||||
public static $tidy_config = array(
|
||||
'output-xml' => true, // Entity encoding
|
||||
'show-body-only' => true,
|
||||
'output-encoding' => 'utf8',
|
||||
'output-encoding' => 'utf-8',
|
||||
'input-encoding' => 'utf-8',
|
||||
'quote-ampersand' => false, // Prevent double encoding
|
||||
'quote-nbsp' => true, // XSLT can handle spaces easier
|
||||
'preserve-entities' => true,
|
||||
@ -740,10 +741,7 @@ abstract class bo_merge
|
||||
{
|
||||
// Clean HTML, if it's being kept
|
||||
if($replace_tags && extension_loaded('tidy')) {
|
||||
$value = tidy_repair_string($value, self::$tidy_config +
|
||||
// Need to detect encoding to get special chars right
|
||||
array('input-encoding'=>mb_detect_encoding($value))
|
||||
);
|
||||
$value = tidy_repair_string($value, self::$tidy_config);
|
||||
}
|
||||
// replace </p> and <br /> with CRLF (remove <p> and CRLF)
|
||||
$value = str_replace(array("\r","\n",'<p>','</p>','<br />'),array('','','',"\r\n","\r\n"),$value);
|
||||
|
Loading…
Reference in New Issue
Block a user