title: Object has no method replace in node-validator module
body: <p>I'm using the following node module because I would like to prevent XSS:
  <a href="https://github.com/chriso/node-validator" rel="nofollow">https://github.com/chriso/node-validator</a></p>
  
  <pre><code>        str = str.replace(non_displayables[i], '');
                    ^
  TypeError: Object 0 has no method 'replace'
      at remove_invisible_characters (C:\Users\Jack\Desktop\Dropbox\Nimble\node_mo
  dules\validator\lib\xss.js:180:19)
  </code></pre>
  
  <p>I'm trying to sanitize the following information and create a JSON object:</p>
  
  <pre><code>var story = {
    _id:          sanitize(data._id).xss(),         //string
    title:        sanitize(data.title).xss(),       //string
    deadline:     sanitize(data.deadline).xss(),    //date string
    description:  sanitize(data.description).xss(), //string
    sp:           sanitize(data.sp).xss(),          //number
    value:        sanitize(data.value).xss(),       //number
    roi:          sanitize(data.roi).xss(),         //decimal number
    type:         sanitize(data.type).xss(),        //string
    lane:         sanitize(data.lane).xss()         //Typically 0
  }
  </code></pre>
  
  <p>I'm including the module at the top of my code:     <code>sanitize = require('validator').sanitize;</code></p>
  
  <p>Lines 178 - 183 of xss.js from the module:</p>
  
  <pre><code>function remove_invisible_characters(str) {
      for (var i in non_displayables) {
          str = str.replace(non_displayables[i], '');
      }
      return str;
  }
  </code></pre>