]> git.parisson.com Git - pdf.js.git/commitdiff
The extension should urlencode the pdf when sending it over to the viewer.
authorgigaherz <gigaherz@gmail.com>
Mon, 31 Oct 2011 19:44:29 +0000 (20:44 +0100)
committergigaherz <gigaherz@gmail.com>
Mon, 31 Oct 2011 19:44:29 +0000 (20:44 +0100)
extensions/firefox/components/pdfContentHandler.js

index a234610857937244484b621f9b0eb8a2f2c605a3..5f659bd9c573e58a96837fe05a1433e4903dcacc 100644 (file)
@@ -56,7 +56,8 @@ pdfContentHandler.prototype = {
       throw NS_ERROR_WONT_HANDLE_CONTENT;
 
     aRequest.cancel(Cr.NS_BINDING_ABORTED);
-    window.location = url.replace('%s', targetUrl);
+    aRequest.cancel(Cr.NS_BINDING_ABORTED);
+    window.location = url.replace('%s', encodeURIComponent(targetUrl));
   },
 
   classID: Components.ID('{2278dfd0-b75c-11e0-8257-1ba3d93c9f1a}'),