title: javascript: replace linebreak
body: <p>I'm having a string which contains a chr(13) as linebreak. How can i replace it with eg. <code>&lt;br&gt;</code>? I tried <code>mystring.replace("\n","&lt;br&gt;");</code> but it didn't work</p>
  
  <p>Thanks in advance.</p>