title: Trimming \n, \s, \t from javascript string
body: <p>I have a jQuery selector which gets the <code>html</code> within a selector, like so:</p>
  
  <pre><code>$('.pp-product-description .noindent').html()
  </code></pre>
  
  <p>Here's an example of the output, I've verified that it's a string:</p>
  
  <pre><code>    &lt;li class="standardBulletText"&gt;600 fill power down adds warmth without weight&lt;/li&gt;
      \r\n\t\t\t\t\t\t \t
      &lt;li class="standardBulletText"&gt;Matte shell with DriOff&amp;trade; finish for water-resistant protection&lt;/li&gt;\
      r\n\t\t\t\t\t\t \t
      &lt;li class="standardBulletText"&gt;Snap-off, adjustable hood with removable faux fur trim&lt;/li&gt;
      \r\n\t\t\t\t\t\t \t&lt;li class="standardBulletText"&gt;Hidden zip/snap closure except for top and bottom snaps&lt;/li&gt;
  </code></pre>
  
  <p>I'm trying to trim this down so that the <code>\r</code>, <code>\n</code> and <code>\t</code> characters disappear. I'm currently using <code>nodeJS</code>' <a href="https://github.com/chriso/node-validator" rel="noreferrer"><code>validate</code> module</a> which has a special <code>sanitize(string).trim()</code> command which should trim away white space. From the docs:</p>
  
  <pre><code>var str = sanitize(' \t\r hello \n').trim();         //'hello'
  </code></pre>
  
  <p>This has worked for me in the past, but here it isn't. I've also tried javascript's built in <code>trim()</code> method, as well as <code>str.replace("\s+", "");</code>, none are working.</p>
  
  <p>Any ideas on what I'm missing, or what I can do to get this working?</p>