title: How to achieve line breaks in a single cell in the csv export?
body: <p>I am using the Output widget for the jQuery plugin Tablesorter.  </p>
  
  <p>I am trying to preserve line breaks when I first export to a csv file and then import the file to a spreadsheet tool like Excel or Google spreadsheets.</p>
  
  <p>Getting nice looking line breaks in the html table is easy. Just add some <code>&lt;br&gt;</code> tags.</p>
  
  <pre><code>    &lt;tr&gt;
          &lt;td&gt;value 1&lt;br&gt;value 2&lt;br&gt;value 3&lt;/td&gt;
          &lt;td&gt;10&lt;/td&gt;
          &lt;td&gt;Koala&lt;/td&gt;
          &lt;td&gt;http://www.google.com&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>Js fiddle: <a href="http://jsfiddle.net/yefw6fh6/" rel="nofollow noreferrer">http://jsfiddle.net/yefw6fh6/</a> </p>
  
  <p>When I export the table in the fiddle I get this.</p>
  
  <pre><code>"AlphaNumeric","Numeric","Animals","Sites"
  "value 1\nvalue 2\nvalue 3","10","Koala","http://www.google.com"
  "value A\nvalue B\nvalue C","234","Ox","http://www.yahoo.com"
  </code></pre>
  
  <p>When the csv file is imported to a Google spreadsheet this is the result.</p>
  
  <p><img src="https://i.imgur.com/EEBYr2Z.png" alt="See here"></p>
  
  <p>The line breaks are replaced by <code>\n</code>.
  I would like to achieve the following result when the csv file is imported.</p>
  
  <p><img src="https://i.imgur.com/Z7znLMz.png" alt="See here">   </p>
  
  <p>All suggestions on how to accomplish this are most welcome.</p>
  
  <p>Thanks!</p>
  
  <h3>Update: Working solution</h3>
  
  <p>I missed the setting for carriage return. Had to add this setting:</p>
  
  <pre><code>$.tablesorter.output.replaceCR = '\r';
  </code></pre>
  
  <p><a href="http://jsfiddle.net/yefw6fh6/2/" rel="nofollow noreferrer">Working fiddle</a></p>