Minor bug thanks to MS/Unix incompatabilities


There’s a minor bug in RT v. 1.0.1

When a queue member using the web gui for anything, such as creating,
commenting, or responding, and content in given in a form, if they
are using Windows, their browser will add a DOS EOL character (^M).

RT will leave this in, but since it runs on 'nix platforms, it ignores the ^M,
and adds a \n as the EOL.

The transaction file thus has a ^M\n at the end of line. Some windows mdas and
mail clients will interpret the Unix \n as a ^M, ending up with ^M^M at the
end of each line. This results the recipient seeing double-spacing in the
e-mail sent via RT.

While this may seem a negligible problem, I’ve had difficulty with a domain
registry as they require specific templates for registration requests sent to
them. A single line of code added to rt/lib/rt/database/content.pm at around
line 50 fixes this:

Before the line

open(CONTENT, “>$file”) or die “Couldn’t open $file for writing: $!\n”;
in function sub write_content, enter the line
$content =~ s/\015//g;

This’ll fix it!


Feargal Reilly,
Systems Administrator,
The CIA.