mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-06 19:21:15 +01:00
small improvements regarding the display of an HTML message (font-size and color in tds, handling of certain HTML special-chars (only occurring as non UTF-8))
This commit is contained in:
parent
bc1a92d1cc
commit
0198792e5c
@ -782,6 +782,7 @@
|
|||||||
$kses->AddProtocol('cid');
|
$kses->AddProtocol('cid');
|
||||||
// since check protocoll is called for every value associated to an attribute we have to add color and background-color to the valid protocolls
|
// since check protocoll is called for every value associated to an attribute we have to add color and background-color to the valid protocolls
|
||||||
$kses->AddProtocol('color');
|
$kses->AddProtocol('color');
|
||||||
|
$kses->AddProtocol('font-size');
|
||||||
$kses->AddProtocol('background-color');
|
$kses->AddProtocol('background-color');
|
||||||
#$kses->AddHTML('html', array(
|
#$kses->AddHTML('html', array(
|
||||||
# 'xmlns' => array(),
|
# 'xmlns' => array(),
|
||||||
|
@ -964,6 +964,20 @@
|
|||||||
if(!empty($body)) {
|
if(!empty($body)) {
|
||||||
$body .= '<hr style="border:dotted 1px silver;">';
|
$body .= '<hr style="border:dotted 1px silver;">';
|
||||||
}
|
}
|
||||||
|
// some characterreplacements, as they fail to translate
|
||||||
|
$sar = array(
|
||||||
|
'@(\x84|\x93|\x94)@',
|
||||||
|
'@(\x96|\x97)@',
|
||||||
|
'@(\x91|\x92)@',
|
||||||
|
'@(\x85)@',
|
||||||
|
);
|
||||||
|
$rar = array(
|
||||||
|
'"',
|
||||||
|
'-',
|
||||||
|
'\'',
|
||||||
|
'...',
|
||||||
|
);
|
||||||
|
if($singleBodyPart['mimeType'] == 'text/html' && strtoupper($singleBodyPart['charSet']) != 'UTF-8') $singleBodyPart['body'] = preg_replace($sar,$rar,$singleBodyPart['body']);
|
||||||
#_debug_array($singleBodyPart['charSet']);
|
#_debug_array($singleBodyPart['charSet']);
|
||||||
$singleBodyPart['body'] = $this->botranslation->convert(
|
$singleBodyPart['body'] = $this->botranslation->convert(
|
||||||
$singleBodyPart['body'],
|
$singleBodyPart['body'],
|
||||||
|
Loading…
Reference in New Issue
Block a user