|
|
@ -1441,6 +1441,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
$j = 0;
|
|
|
|
$j = 0;
|
|
|
|
$out = '';
|
|
|
|
$out = '';
|
|
|
|
$allvalues = array();
|
|
|
|
$allvalues = array();
|
|
|
|
|
|
|
|
$show_email = $RCMAIL->config->get('message_show_email');
|
|
|
|
|
|
|
|
|
|
|
|
if ($addicon && !isset($_SESSION['writeable_abook'])) {
|
|
|
|
if ($addicon && !isset($_SESSION['writeable_abook'])) {
|
|
|
|
$_SESSION['writeable_abook'] = $RCMAIL->get_address_sources(true) ? true : false;
|
|
|
|
$_SESSION['writeable_abook'] = $RCMAIL->get_address_sources(true) ? true : false;
|
|
|
@ -1453,7 +1454,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
$string = $part['string'];
|
|
|
|
$string = $part['string'];
|
|
|
|
|
|
|
|
|
|
|
|
// phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>"
|
|
|
|
// phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>"
|
|
|
|
if ($name && $name != $mailto && strpos($name, '@')) {
|
|
|
|
if (!$show_email && $name && $name != $mailto && strpos($name, '@')) {
|
|
|
|
$name = '';
|
|
|
|
$name = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1471,13 +1472,21 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (check_email($part['mailto'], false)) {
|
|
|
|
else if (check_email($part['mailto'], false)) {
|
|
|
|
if ($linked) {
|
|
|
|
if ($linked) {
|
|
|
|
$address = html::a(array(
|
|
|
|
$attrs = array(
|
|
|
|
'href' => 'mailto:' . $mailto,
|
|
|
|
'href' => 'mailto:' . $mailto,
|
|
|
|
'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($mailto)),
|
|
|
|
'onclick' => sprintf("return %s.command('compose','%s',this)", JS_OBJECT_NAME, JQ($mailto)),
|
|
|
|
'title' => $mailto,
|
|
|
|
|
|
|
|
'class' => "rcmContactAddress",
|
|
|
|
'class' => "rcmContactAddress",
|
|
|
|
),
|
|
|
|
);
|
|
|
|
Q($name ? $name : $mailto));
|
|
|
|
|
|
|
|
|
|
|
|
if ($show_email && $name && $mailto) {
|
|
|
|
|
|
|
|
$content = Q($name ? sprintf('%s <%s>', $name, $mailto) : $mailto);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
$content = Q($name ? $name : $mailto);
|
|
|
|
|
|
|
|
$attrs['title'] = $mailto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$address = html::a($attrs, $content);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$address = html::span(array('title' => $mailto, 'class' => "rcmContactAddress"),
|
|
|
|
$address = html::span(array('title' => $mailto, 'class' => "rcmContactAddress"),
|
|
|
|