From 8452d698c1d738b74d15e0001cc0456535002dcc Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sat, 15 Jul 2006 10:36:48 +0000 Subject: [PATCH] Use css padding instead of line breaks in body git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@105 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/misc.inc.php | 10 ++++------ banana/post.inc.php | 2 +- css/style.css | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/banana/misc.inc.php b/banana/misc.inc.php index d680293..b280c9a 100644 --- a/banana/misc.inc.php +++ b/banana/misc.inc.php @@ -545,11 +545,11 @@ function cleanurl($url) function formatbody($_text, $format='plain', $flowed=false) { if ($format == 'html') { - $res = '
'.html_entity_decode(to_entities(removeEvilTags($_text))).'
'; + $res = html_entity_decode(to_entities(removeEvilTags($_text))); } else if ($format == 'richtext') { - $res = '
'.html_entity_decode(to_entities(richtextToHtml($_text))).'
'; + $res = html_entity_decode(to_entities(richtextToHtml($_text))); } else { - $res = "\n" . to_entities(wrap($_text, "", $flowed)) . "\n"; + $res = to_entities(wrap($_text, "", $flowed)); $res = formatPlainText($res); } @@ -572,7 +572,6 @@ function formatbody($_text, $format='plain', $flowed=false) $res = preg_replace("@(]*>)\n?-- ?\n@", "
--
\\1", $res); $parts = preg_split("@(:?]*>\n?-- ?\n?

|]*>\n?-- ?\n?]*>)@", $res); $sign = '
'; - $end = '
'; } else { while (preg_match("@(^|
|\n)>@i", $res)) {
             $res  = preg_replace("@(^|
|\n)((>[^\n]*\n)+)@ie",
@@ -584,10 +583,9 @@ function formatbody($_text, $format='plain', $flowed=false)
         $res = preg_replace("@
-- ?\n@", "
\n-- \n", $res);
         $parts = preg_split("/\n-- ?\n/", $res);
         $sign  = '

';
-        $end   = null;
     }
 
-    return join($sign, $parts) . $end;
+    return join($sign, $parts);
 }
 
 // vim:set et sw=4 sts=4 ts=4
diff --git a/banana/post.inc.php b/banana/post.inc.php
index 8d06e75..8df86dd 100644
--- a/banana/post.inc.php
+++ b/banana/post.inc.php
@@ -439,7 +439,7 @@ class BananaPost
  
         preg_match("@text/([^;]+);@", $this->headers['content-type'], $format);
         $format = $format[1];
-        $res .= ']*bgcolor="?([#0-9a-f]+)"?[^>]*>@i', $this->body, $bgcolor)) {
                 $res .= ' bgcolor="'.$bgcolor[1].'"';
diff --git a/css/style.css b/css/style.css
index 8cd185d..32baf71 100644
--- a/css/style.css
+++ b/css/style.css
@@ -53,6 +53,7 @@ table.banana_msg td.headers { width: 100%; }
 table.banana_msg .hdr { width: 15%; text-align: right; font-weight: bold; padding-right: 1em; }
 table.banana_msg td.xface { text-align: right; }
 table.banana_msg th.subject { font-size: 120%; }
+table.banana_msg td.body { padding-top: 1em; padding-bottom: 0.5em; }
 
 table.banana_msg td.thrd { padding: 0px; }
 table.banana_msg table { border: 0px; padding: 0px; margin: 0px; width: 100%; }
-- 
2.1.4