Changeset 8490014 in github


Ignore:
Timestamp:
Jan 14, 2010 2:17:44 PM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
76c94b6
Parents:
cea5bc8
Message:
  • better headers formatting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/headers.inc

    r2717f9f r8490014  
    2626    { 
    2727    $source = htmlspecialchars(trim($source)); 
    28     $source = preg_replace('/\t/', '&nbsp;&nbsp;&nbsp;&nbsp;', $source); 
    29     $source = preg_replace('/^([a-z0-9_:-]+)/im', '<font class="bold">'.'\1'.'</font>', $source); 
    30     $source = preg_replace('/\r?\n/', '<br />', $source); 
     28    $source = preg_replace( 
     29      array( 
     30        '/\n[\t\s]+/', 
     31        '/^([a-z0-9_:-]+)/im', 
     32        '/\r?\n/' 
     33      ), 
     34      array( 
     35        "\n&nbsp;&nbsp;&nbsp;&nbsp;", 
     36        '<font class="bold">\1</font>', 
     37        '<br />' 
     38      ), $source); 
    3139     
    3240    $OUTPUT->command('set_headers', $source); 
Note: See TracChangeset for help on using the changeset viewer.