title: How come I can't url encode this URL in node.js?
body: <pre><code>$node
  querystring = require('querystring')
  var dict = { 'q': 'what\'s up' };
  var url = 'http://google.com/?q=' + querystring.stringify(dict);
  url = encodeURIComponent(url);
  console.log(url);
  </code></pre>
  
  <p>The result is this:</p>
  
  <pre><code>"http://google.com/?q=q=what's%20up"
  </code></pre>
  
  <p>Notice how the single quote is not encoded correctly. Is there something wrong with the node.js module?</p>