summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-01-14 19:17:44 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-01-14 19:17:44 +0000
commita79c6db000d7c009d8bf7564c1b548ce860d31da (patch)
treec0c5211c4ec116b3bb74297944afdac6f232e0a8 /roundcubemail/program
parentc88f9f14e150f59332d9ce19364a9a490c3009b6 (diff)
- better headers formatting
git-svn-id: https://svn.roundcube.net/trunk@3207 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/headers.inc14
1 files changed, 11 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/headers.inc b/roundcubemail/program/steps/mail/headers.inc
index 653fb9647..247827afc 100644
--- a/roundcubemail/program/steps/mail/headers.inc
+++ b/roundcubemail/program/steps/mail/headers.inc
@@ -25,9 +25,17 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
if ($source)
{
$source = htmlspecialchars(trim($source));
- $source = preg_replace('/\t/', '&nbsp;&nbsp;&nbsp;&nbsp;', $source);
- $source = preg_replace('/^([a-z0-9_:-]+)/im', '<font class="bold">'.'\1'.'</font>', $source);
- $source = preg_replace('/\r?\n/', '<br />', $source);
+ $source = preg_replace(
+ array(
+ '/\n[\t\s]+/',
+ '/^([a-z0-9_:-]+)/im',
+ '/\r?\n/'
+ ),
+ array(
+ "\n&nbsp;&nbsp;&nbsp;&nbsp;",
+ '<font class="bold">\1</font>',
+ '<br />'
+ ), $source);
$OUTPUT->command('set_headers', $source);
$OUTPUT->send();