Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- better headers formatting

  • Loading branch information...
commit 8490014ffe2652b0065e3d3e0a68c3e9e0bdde4a 1 parent cea5bc8
@alecpl alecpl authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 program/steps/mail/headers.inc
View
14 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/', '    ', $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();
Please sign in to comment.
Something went wrong with that request. Please try again.