title: Why does Internet Explorer reject my filename with spaces?
body: <p>I have a bunch of pdf files that have spaces in their name which are displayed in an iFrame as well as in a new window using window.open (not at the same time).</p>
  
  <p>Both work fine in everything except IE8 which throws a file not found error. Remove the spaces and they work fine in IE8. </p>
  
  <p>I need to retain the spaces in the file names so I tried using escape(filename); which repalces the spaces with the escape key %20. This doesn't work either.</p>
  
  <p>I have tried evrything I could think of or could google to make IE8 accept the spaces, but nothing seams to work.</p>
  
  <p>Any suggestions? I can remove the spaces for testing but in the real world removing the spaces from the names of the pdf files in the file system is not currently an option.</p>
  
  <p>Here is the code I am working with</p>
  
  <pre><code>var file = "pdfs/this file name has spaces.pdf";
  file = escape(file);  //this does not fix the problem
  
  //to display in a new window or tab...
  window.open(file);
  
  //to display in my iFrame...
  $('.viewer .ifrm').attr('src', file);
  </code></pre>
  
  <p>Thanks.</p>