Changeset 4585


Ignore:
Timestamp:
06/03/11 12:00:31 (9 years ago)
Author:
niltonneto
Message:

Ticket #1962 - Corrigido problema do envio em texto plano no Internet Explorer.

Location:
branches/2.2/expressoMail1_2/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/js/main.js

    r4584 r4585  
    16791679        textArea.name = "body"; 
    16801680        body = document.getElementById("body_"+ID); 
    1681         textArea.value = ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
     1681        textArea.value = ( ( mail_as_plain ) ? (is_ie ? body.contentWindow.document.body.innerHTML : body.previousSibling.value) : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
    16821682        var input_folder = document.createElement("INPUT"); 
    16831683        input_folder.style.display='none'; 
  • branches/2.2/expressoMail1_2/js/rich_text_editor.js

    r4379 r4585  
    163163 
    164164        if (source) { 
     165                var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 
    165166                if (is_ie){ 
    166167                        connector.loadScript('html2xhtml'); 
    167168                        html = frames[this.editor].document.body; 
    168169                        var xhtml = get_xhtml(html, 'en', 'iso-8859-1'); 
     170                        xhtml = xhtml.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' ); 
     171                        if ( ! mobile_device && xhtml != '' && ! ( mail_as_plain.checked = confirm( get_lang( 'The text format will be lost' ) + '.' ) ) ) 
     172                                return false; 
    169173                        frames[this.editor].document.body.innerText = xhtml; 
    170174                        document.getElementById("table_richtext_toolbar").style.visibility="hidden"; 
    171175                } 
    172176                else{ 
    173                         var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 
    174  
    175177                        html = document.createTextNode( editor.contentWindow.document.body.innerHTML ); 
    176178                        html = html.nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' ); 
Note: See TracChangeset for help on using the changeset viewer.