| | |
| | | if ($q > $quote_level) { |
| | | $body[$n] = $replacer->get_replacement($replacer->add( |
| | | str_repeat('<blockquote>', $q - $quote_level))) . $body[$n]; |
| | | $last = $n; |
| | | } |
| | | else if ($q < $quote_level) { |
| | | $body[$n] = $replacer->get_replacement($replacer->add( |
| | | str_repeat('</blockquote>', $quote_level - $q))) . $body[$n]; |
| | | $last = $n; |
| | | } |
| | | else if ($flowed) { |
| | | // previous line is flowed |
| | |
| | | * return table with message headers |
| | | */ |
| | | function rcmail_message_headers($attrib, $headers=null) |
| | | { |
| | | { |
| | | global $OUTPUT, $MESSAGE, $PRINT_MODE, $RCMAIL; |
| | | static $sa_attrib; |
| | | |
| | |
| | | html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)), |
| | | html::img(array( |
| | | 'class' => 'image-thumbnail', |
| | | 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, true) . '&_thumb=1', |
| | | 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image') . '&_thumb=1', |
| | | 'title' => $attach_prop->filename, |
| | | 'alt' => $attach_prop->filename, |
| | | 'style' => sprintf('max-width:%dpx; max-height:%dpx', $thumbnail_size, $thumbnail_size), |
| | |
| | | html::tag('legend', 'image-filename', Q($attach_prop->filename)) . |
| | | html::p(array('align' => "center"), |
| | | html::img(array( |
| | | 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, true), |
| | | 'src' => $MESSAGE->get_part_url($attach_prop->mime_id, 'image'), |
| | | 'title' => $attach_prop->filename, |
| | | 'alt' => $attach_prop->filename, |
| | | ))) |
| | |
| | | $name = $part['name']; |
| | | $mailto = $part['mailto']; |
| | | $string = $part['string']; |
| | | $valid = check_email($mailto, false); |
| | | |
| | | // phishing email prevention (#1488981), e.g. "valid@email.addr <phishing@email.addr>" |
| | | if ($name && $valid && $name != $mailto && strpos($name, '@')) { |
| | | $name = ''; |
| | | } |
| | | |
| | | // IDNA ASCII to Unicode |
| | | if ($name == $mailto) |
| | |
| | | // for printing we display all addresses |
| | | continue; |
| | | } |
| | | else if (check_email($part['mailto'], false)) { |
| | | else if ($valid) { |
| | | if ($linked) { |
| | | $address = html::a(array( |
| | | 'href' => 'mailto:'.$mailto, |
| | |
| | | if ($name) |
| | | $address .= Q($name); |
| | | if ($mailto) |
| | | $address .= (strlen($address) ? ' ' : '') . sprintf('<%s>', Q($mailto)); |
| | | $address = trim($address . ' ' . Q($name ? sprintf('<%s>', $mailto) : $mailto)); |
| | | } |
| | | |
| | | $address = html::span('adr', $address); |
| | |
| | | // application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608 |
| | | if (preg_match('/^application\/pdf.+/', $name)) |
| | | $name = 'application/pdf'; |
| | | |
| | | // treat image/pjpeg as image/jpeg |
| | | // treat image/pjpeg (image/pjpg, image/jpg) as image/jpeg (#1489097) |
| | | else if (preg_match('/^image\/p?jpe?g$/', $name)) |
| | | $name = 'image/jpeg'; |
| | | |