- /* First we unfold the header */
- $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $hdr));
+ /* First we replace \r\n by \n and unfold the header */
+ $hdr = trim(str_replace(array("\r\n", "\n\t", "\n "),array("\n", ' ', ' '), $hdr));