title: Character Replacement: Break-Lines
body: <p>I have a few areas in an application of mine that I have &lt;textarea> tags so users can enter messages to one another.  A problem with some messages had been plaguing me for a while, but I could never figure out what the problem was.  I would open up all the messages at once and save them in hidden  tags.  When the user 'opened' the message, the data from the  tag would be gathered and shown in a lightbox for the user.  For some reason, it wouldn't open some of those messages.</p>
  
  <p>One of my users noticed that if you used a line-break (using 'shift+enter') in the message, it would break the Javascript when it tried to retrieve the message.  Since this is only a problem when trying to read the message, I should be able to replace it when the message is sent in the first place.</p>
  
  <p>How can I detect a line-break and replace it when it is submitted? </p>
  
  <pre><code>str_replace(???,"/n",$string)
  </code></pre>