Yeah well what about line breaks?
$body = preg_replace("/\n/", "
", $body);
That line of code needs to be added above
return "
".$body."\n
";
this is in func.inc
Another error, which is infact, HORRIBLE. Is the "protection" of emails from malicious javascript. You know like onclick= in an email.
Well the regex that is used to replace it, replaced HALF the email if it has the word ON in it. So lets say a person sends..
Lets walk the dog on saturday, what do
YOU think?
Well the program would allow you to read..
_removed="text-decoration:underline">YOU think?
The fix is simple.
You replace it with this regex, which is infact, correct.
$body = preg_replace('/(<\w+\s[^><]*)(on[^<>=]+)=/im', '\1\2__removed=', $body);
The original is really silly and makes no sense. do a search for _removed and you will find it.
Please do not get me wrong, I'm not trying to be hostile, I'm just frustrated cause I do not work in this department specifically but I had to assist anyway and there were just so many problems.. I understand you are beta, but please put more effort into these things, its what matters.
P.S. Again I have no idea what the association with this code is with the company I'm posting at.. I'm just a programmer who got assigned to the project.