|
|
|
@ -785,7 +785,23 @@ function rcmail_print_body($part, $p = array())
|
|
|
|
|
unset($data['body']);
|
|
|
|
|
|
|
|
|
|
// plaintext postprocessing
|
|
|
|
|
if ($part->ctype_secondary == 'plain') {
|
|
|
|
|
if ($part->ctype_secondary == 'plain')
|
|
|
|
|
$body = rcmail_plain_body($body);
|
|
|
|
|
|
|
|
|
|
// allow post-processing of the message body
|
|
|
|
|
$data = $RCMAIL->plugins->exec_hook('message_part_after', array('type' => $part->ctype_secondary, 'body' => $body) + $data);
|
|
|
|
|
|
|
|
|
|
return $data['type'] == 'html' ? $data['body'] : html::tag('pre', array(), $data['body']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle links and citation marks in plain text message
|
|
|
|
|
*
|
|
|
|
|
* @param string Plain text string
|
|
|
|
|
* @return string Formatted HTML string
|
|
|
|
|
*/
|
|
|
|
|
function rcmail_plain_body($body)
|
|
|
|
|
{
|
|
|
|
|
// make links and email-addresses clickable
|
|
|
|
|
$replacements = new rcube_string_replacer;
|
|
|
|
|
|
|
|
|
@ -837,12 +853,8 @@ function rcmail_print_body($part, $p = array())
|
|
|
|
|
|
|
|
|
|
// insert the links for urls and mailtos
|
|
|
|
|
$body = $replacements->resolve(join("\n", $a_lines));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// allow post-processing of the message body
|
|
|
|
|
$data = $RCMAIL->plugins->exec_hook('message_part_after', array('type' => $part->ctype_secondary, 'body' => $body) + $data);
|
|
|
|
|
|
|
|
|
|
return $data['type'] == 'html' ? $data['body'] : html::tag('pre', array(), $data['body']);
|
|
|
|
|
return $body;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1027,7 +1039,8 @@ function rcmail_message_body($attrib)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
$out .= html::div('message-part', html::tag('pre', array(), Q($MESSAGE->body)));
|
|
|
|
|
$out .= html::div('message-part', html::tag('pre', array(),
|
|
|
|
|
rcmail_plain_body(Q($MESSAGE->body, 'strict', false))));
|
|
|
|
|
|
|
|
|
|
$ctype_primary = strtolower($MESSAGE->structure->ctype_primary);
|
|
|
|
|
$ctype_secondary = strtolower($MESSAGE->structure->ctype_secondary);
|
|
|
|
|