mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-14 02:18:31 +02:00
replace original message header with fieldset in html and convert it to plain as before
This commit is contained in:
@ -273,7 +273,7 @@ class Html
|
||||
chr(161),
|
||||
chr(162),
|
||||
chr(163),
|
||||
'(C)',//chr(169),// copyrighgt
|
||||
'(C)',//chr(169),// copyright
|
||||
'(R)',//chr(174),// registered
|
||||
'(TM)',// trade
|
||||
"'",
|
||||
@ -282,6 +282,16 @@ class Html
|
||||
);
|
||||
$_html = preg_replace($Rules, $Replace, $_html);
|
||||
|
||||
// replace fieldset with legend used for original message header
|
||||
$_html = preg_replace_callback('#<fieldset[^>]*>\s*<legend>(.*)</legend>\s*(.*)\s*</fieldset>#sm',
|
||||
static function($matches)
|
||||
{
|
||||
$len_legend = strlen($legend = $matches[1]);
|
||||
$content = preg_replace('/<([^@> ]+@[^> ]+)>/', '#lower#than#$1#greater#than#', $matches[2]);
|
||||
return "<br>".str_repeat('-', (64-$len_legend-2)>>1).' '.$legend.' '.str_repeat('-', (64-$len_legend-2+1)>>1)."<br>".
|
||||
$content.str_repeat('-', 64)."<br>";
|
||||
}, $_html);
|
||||
|
||||
// removing carriage return linefeeds, preserve those enclosed in <pre> </pre> tags
|
||||
if ($stripcrl === true )
|
||||
{
|
||||
@ -584,4 +594,4 @@ class Html
|
||||
//error_log(__METHOD__.__LINE__.array2string($html2ret));
|
||||
return $html2ret;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user