FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Why is "backslash n" replaced in outgoing mail?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Why is "backslash n" replaced in outgoing mail? [message #158952] Sun, 19 April 2009 12:11 Go to previous message
tgtaft is currently offline  tgtaft   United States
Messages: 3
Registered: March 2009
Karma:
Junior Member
I've noticed that when a post contains the two characters "backslash n" (i.e., '\n'), FUDforum replaces them with a single newline (i.e., "\n") in mail notifications. I tracked this down to line 78 of src/iemail.inc.t:

$body = str_replace(array('\n',"\r"), array("\n",""), $body);

If I change this to:

$body = str_replace("\r", "", $body);

The problem goes away. But why was the code there? Is it OK to change it or will that cause another problem?

I can't see any reason to suppress the "backslash n" character sequence; in fact, the current behaviour is very annoying when posting code snippets (e.g., I suspect the code above with its sequence of backslash n's will appear corrupted in email).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: change ROOT path and time problem
Next Topic: NNTP Errors
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 05:49:27 GMT 2024

Total time taken to generate the page: 0.04339 seconds