From 025eed93bea343ed79da24cbaf0be346c8f619a2 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Sun, 11 Nov 2012 01:50:26 -0600 Subject: [PATCH] Fix CSS url() links when served from zotero:// protocol --- components/zotero-protocol-handler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js index 54f81f5c51..9a873fc0d5 100644 --- a/components/zotero-protocol-handler.js +++ b/components/zotero-protocol-handler.js @@ -819,6 +819,11 @@ function ChromeExtensionHandler() { var fileURI = ph.newFileURI(file); } var channel = ioService.newChannelFromURI(fileURI); + //set originalURI so that it seems like we're serving from zotero:// protocol + //this is necessary to allow url() links to work from within css files + //otherwise they try to link to files on the file:// protocol, which is not allowed + channel.originalURI = uri; + return channel; } catch (e) {