| | |
| | | else if ($data['type'] == 'enriched') { |
| | | $part->ctype_secondary = 'html'; |
| | | require_once(INSTALL_PATH . 'program/lib/enriched.inc'); |
| | | $body = Q(enriched_to_html($data['body']), 'show'); |
| | | $body = enriched_to_html($data['body']); |
| | | $body = rcmail_wash_html($body, $data, $part->replaces); |
| | | $part->ctype_secondary = 'html'; |
| | | } |
| | | else { |
| | | // assert plaintext |
| | |
| | | |
| | | // find/mark quoted lines... |
| | | for ($n=0, $cnt=count($body); $n < $cnt; $n++) { |
| | | if ($body[$n][0] == '>' && preg_match('/^(>+\s*)+/', $body[$n], $regs)) { |
| | | $q = strlen(preg_replace('/\s/', '', $regs[0])); |
| | | if ($body[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $body[$n], $regs)) { |
| | | $q = substr_count($regs[0], '>'); |
| | | $body[$n] = substr($body[$n], strlen($regs[0])); |
| | | |
| | | if ($q > $quote_level) { |
| | |
| | | '4' => 'low', |
| | | '5' => 'lowest', |
| | | ); |
| | | |
| | | |
| | | if ($value && $labels_map[$value]) |
| | | return rcube_label($labels_map[$value]); |
| | | |
| | | |
| | | return ''; |
| | | } |
| | | |
| | |
| | | $mailto = rcube_idn_to_utf8($mailto); |
| | | |
| | | if ($PRINT_MODE) { |
| | | $out .= sprintf('%s <%s>', Q($name), $mailto); |
| | | $out .= ($out ? ', ' : '') . sprintf('%s <%s>', Q($name), $mailto); |
| | | // for printing we display all addresses |
| | | continue; |
| | | } |
| | | else if (check_email($part['mailto'], false)) { |
| | | if ($linked) { |
| | |
| | | if ($addicon && $_SESSION['writeable_abook']) { |
| | | $address .= html::a(array( |
| | | 'href' => "#add", |
| | | 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, $string), |
| | | 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, JQ($string)), |
| | | 'title' => rcube_label('addtoaddressbook'), |
| | | 'class' => 'rcmaddcontact', |
| | | ), |
| | |
| | | $out .= $line . "\n"; |
| | | } |
| | | |
| | | return $out; |
| | | return rtrim($out, "\n"); |
| | | } |
| | | |
| | | |