Thread:Extension talk:Scribunto/Newline encoding/reply

I can confirm the bug on Windows Vista and also —with a small fix— the solution.

The line $buf1 = strtr($buffer, array("\r" => "")); introduces a new bug for strings containing legitimate. A better replace is $buf1 = strtr($buffer, array("\r\n" => "\n"));

Also submitted as 46294.