- $css = preg_replace("/(^|\n|,)\s*(\w+[^\{\}\<]+\{)/s", '\1.banana .message .body .html \2', $css);
- $css = preg_replace('/ body\b/i', '', $css);
- Banana::$page->addCssInline($css);
- }
-
- // clean DTD
- $source = str_replace('<font', '<span', $source);
- $source = preg_replace('/<u\b/', '<span style="text-decoration: underline"', $source);
- $source = preg_replace('/<\/(font|u)>/', '</span>', $source);
- $source = str_replace('<body', $css ? '<div class="html"' : '<div class="html default"', $source);
- $source = str_replace('</body>', '</div>', $source);