Changeset 2779 for branches/2.0


Ignore:
Timestamp:
05/14/10 10:54:09 (14 years ago)
Author:
niltonneto
Message:

Ticket #1076 - Corrigido exibição de text/plain. Removido nl2br e incluído tag <PRE>.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php

    r2775 r2779  
    722722                                { 
    723723                                        $content = str_replace( array( '<', '>' ), array( ' #$<$# ', ' #$>$# ' ), $content ); 
    724                                         $content = nl2br( htmlentities( $content ) ); 
     724                                        $content = htmlentities( $content ); 
    725725                                        $content = $this -> replace_links( $content ); 
    726726                                        $content = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $content ); 
    727                                         $content = '<span style="font-family: monospace">' . $content . '</span>'; 
     727                                        $content = '<pre style="font-family: monospace">' . $content . '</pre>'; 
    728728 
    729729                                        $return[ 'body' ] = $content; 
     
    776776                                                // if TXT file size > 100kb, then it will not expand. 
    777777                                                if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) { 
    778                                                         $content .= nl2br(htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])));                                                      
     778                                                        $content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])); 
     779                                                        $content = '<pre style="font-family: monospace">' . $content . '</pre>';                                                         
    779780                                                } 
    780781                                        } 
     
    789790                                else if($file_type == "message/delivery-status" || $file_type == "message/feedback-report"){ 
    790791                                        $content .= "<hr align='left' width='95%' style='border:1px solid #DCDCDC'>"; 
    791                                         $content .= nl2br($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])); 
     792                                        $content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]); 
     793                                        $content = '<pre style="font-family: monospace">' . $content . '</pre>'; 
    792794 
    793795                                } 
     
    850852                                                                { 
    851853                                                                        $body = str_replace( array( '<', '>' ), array( ' #$<$# ', ' #$>$# ' ), $body ); 
    852                                                                         $body = nl2br( htmlentities( $body ) ); 
     854                                                                        $body = htmlentities( $body ); 
    853855                                                                        $body = $this -> replace_links( $body ); 
    854856                                                                        $body = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $body ); 
    855                                                                         $body = '<span style="font-family: monospace">' . $body . '</span>'; 
     857                                                                        $body = '<pre style="font-family: monospace">' . $body . '</pre>'; 
    856858                                                                } 
    857859 
Note: See TracChangeset for help on using the changeset viewer.