title: JQuery detect newline in a string
body: <p>A "str" variable in JavaScript return by a backend contains a string with a few paragraphs separated by line breakers.. When I do this:</p>
  
  <pre><code>console.log(str);
  </code></pre>
  
  <p>the Firefox console displays:</p>
  
  <pre><code>"This is paragraph 1.
  
  This is paragraph2.
  
  This is paragraph3"
  </code></pre>
  
  <p>The problem is, this str is NOT separated by a "\n" character. It's just separated by invisible linebreaks, as you can see in the console output. Is there any way to detect this line break? What I'm eventually trying to do is replace these invisible line breaks with a "br" tag so that I can append it inside the html document..</p>
  
  <p>Is there a way to do this?</p>
  
  <p>Thanks</p>
  
  <p>(Unfortunately, there is no way to change the backend..)</p>