- Timestamp:
- Jul 24, 2010, 11:00:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/include/functions_mail.inc.php
r6410 r6705 761 761 } 762 762 } 763 763 764 foreach ($selectors as $selector => $style) 764 765 { 765 766 if (!preg_match('/^(#|\.|)([A-Za-z0-9_-]*)$/', $selector, $matches)) 766 767 { 767 $unknow_selectors .= $selector.' {'.implode( '; ', $style).";}\n";768 $unknow_selectors .= $selector.' {'.implode(";\n", $style).";}\n"; 768 769 } 769 770 else switch ($matches[1]) 770 771 { 771 772 case '#': 772 $content = preg_replace('|id="'.$matches[2].'"|', 'id="'.$matches[2].'" style="'.implode( '; ', $style).';"', $content);773 $content = preg_replace('|id="'.$matches[2].'"|', 'id="'.$matches[2].'" style="'.implode(";\n", $style).";\"\n", $content); 773 774 break; 774 775 case '.': 775 $content = preg_replace('|class="'.$matches[2].'"|', 'class="'.$matches[2].'" style="'.implode( '; ', $style).';"', $content);776 $content = preg_replace('|class="'.$matches[2].'"|', 'class="'.$matches[2].'" style="'.implode(";\n", $style).";\"\n", $content); 776 777 break; 777 778 default: 778 $content = preg_replace('#<'.$matches[2].'( |>)#', '<'.$matches[2].' style="'.implode( '; ', $style).';"$1', $content);779 $content = preg_replace('#<'.$matches[2].'( |>)#', '<'.$matches[2].' style="'.implode(";\n", $style).";\"\n$1", $content); 779 780 break; 780 781 }
Note: See TracChangeset
for help on using the changeset viewer.