Ignore:
Timestamp:
01/06/12 10:56:52 (12 years ago)
Author:
cristiano
Message:

Ticket #2424 - Mensagem alterando o layout do expresso

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r5317 r5318  
    18601860 
    18611861            $regs_found = array(); 
    1862             $tags_found = @mb_eregi("<style\b[^>]*>(.*?)</style[^>]*>", $body, $regs_found); 
     1862            $tags_found = preg_match_all("@<style[^>]*>.*?</style[^>]*>@s", $body, $regs_found); 
    18631863            $wrapper_class = 'ExpressoCssWrapper' . time(); 
    1864  
     1864                         
    18651865            foreach ($regs_found as $block_found) { 
    1866                 $n_start = strpos($block_found, '>') + 1; 
    1867                 $n_length = strrpos($block_found, '<') - $n_start; 
    1868                 $bf_innerHTML = substr($block_found, $n_start, $n_length); 
    1869  
     1866                $n_start = strpos($block_found[0], '>') + 1; 
     1867                $n_length = strrpos($block_found[0], '<') - $n_start; 
     1868                $bf_innerHTML = substr($block_found[0], $n_start, $n_length); 
     1869                               
    18701870                $bf_innerHTML = mb_ereg_replace('<!--', '', $bf_innerHTML); 
    18711871                $bf_innerHTML = mb_ereg_replace('-->', '', $bf_innerHTML); 
    1872  
     1872               
    18731873                $css->parse($bf_innerHTML); 
    18741874 
     
    18901890                        unset($css->css[41][$key]); 
    18911891                    } 
    1892  
     1892                                               
    18931893                $body = str_replace($block_found, '<style>' . $css->print->plain() . '</style>', $body); 
    18941894        } 
Note: See TracChangeset for help on using the changeset viewer.