Shoutbox

[help] strip newline chars - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [help] strip newline chars (/showthread.php?tid=63493)

[help] strip newline chars by AberNStein on 07-18-2006 at 01:35 AM

so my script is toasting messages recieved, but if the message has a return or a newline it shows up as one of them rectangle thingies in the toast. i've tried Message = Message.replace('\s',' '); and i've tried that with \n and \r too. how do i strip newline and carriage returns?


RE: [help] strip newline chars by Silentdragon on 07-18-2006 at 02:17 AM

Message = Message.replace(/\n|\r/g,"");

That should do it for you.


RE: [help] strip newline chars by Mike on 07-18-2006 at 06:25 PM

[Solved]Weird breakline problems

By the way, dont look at "[Solved]"
It seems that it also happens with normal Plus! windows...

quote:
Originally posted by Silentdragon
Message = Message.replace(/\n|\r/g,"");

That should do it for you.
Thanks.

I will try that and see if this works...