title: White spaces getting removed on generating csv files from HTML dropdown list
body: <p>I want to get a csv file downloaded with the white spaces preserved in between the words.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;select id="ddl"&gt;
     &lt;option value="1"&gt;One apple&lt;/option&gt;
     &lt;option value="2"&gt;Two Oranges&lt;/option&gt;
     &lt;option value="3"&gt;Three Grapes&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>var ddlArray= new Array();
  var ddl = document.getElementById('ddl');
  
  for (i = 0; i &lt; ddl.options.length; i++) {
    ddlArray[i] = ddl .options[i].text;
  }
  
  var csvRows = [];
  for (i = 0; i &lt; ddlArray.length; i++) {
     csvRows.push(ddlArray[i]+",");
  }
  var csvString = csvRows.join("%0A");
  
  
  var a = document.createElement('a');
  
  a.href = 'data:attachment/csv,' + csvString;
  a.target = '_blank';
  a.download = 'sampleDownload.csv';
  
  document.body.appendChild(a);
  a.click();
  </code></pre>
  
  <p>When I am executing the above code, a sampleDownload.csv is getting downloaded, but the option values are getting trimmed so that all the white spaces are lost. Example "OneApple" instead of "One Apple". Will it be possible to preserve the white spaces in the csv file?</p>
  
  <p>If I execute an alert the value do contain the white space.</p>
  
  <p>Please help.</p>
  
  <p>The snippet can also be found in JSFiddle: Click here: <a href="http://jsfiddle.net/p25x8gfw/8/" rel="nofollow">http://jsfiddle.net/p25x8gfw/8/</a></p>
  
  <p>This will download a samleDownload.csv on your machine. Works in Chrome and Firefox.</p>