mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Fix ZoteroProtocolHandler URI parsing
nsIURI#pathQueryRef no longer includes the authority component. A URI that would've had pathQueryRef '//authority/path' before will now have pathQueryRef '/path'. Reader seems to be functional after this change.
This commit is contained in:
parent
2e0a10f732
commit
41f8c8e399
1 changed files with 4 additions and 5 deletions
|
|
@ -69,7 +69,7 @@ export function ZoteroProtocolHandler() {
|
|||
if (!uriPath) {
|
||||
return this._errorChannel('Invalid URL');
|
||||
}
|
||||
uriPath = uriPath.substr('//attachment/'.length);
|
||||
uriPath = uriPath.substring(1);
|
||||
|
||||
var params = {};
|
||||
var router = new Zotero.Router(params);
|
||||
|
|
@ -185,7 +185,7 @@ export function ZoteroProtocolHandler() {
|
|||
if (!path) {
|
||||
return 'Invalid URL';
|
||||
}
|
||||
path = path.substr('//report/'.length);
|
||||
path = path.substring(1);
|
||||
|
||||
// Proxy CSS files
|
||||
if (path.endsWith('.css')) {
|
||||
|
|
@ -823,8 +823,7 @@ export function ZoteroProtocolHandler() {
|
|||
if (!path) {
|
||||
return 'Invalid URL';
|
||||
}
|
||||
path = path.substr('//select/'.length);
|
||||
var mimeType, content = '';
|
||||
path = path.substring(1);
|
||||
|
||||
var params = {
|
||||
objectType: 'item'
|
||||
|
|
@ -1049,7 +1048,7 @@ export function ZoteroProtocolHandler() {
|
|||
if (!uriPath) {
|
||||
return 'Invalid URL';
|
||||
}
|
||||
uriPath = uriPath.replace(/^\/\/open(-pdf)?\//, '');
|
||||
uriPath = uriPath.substring(1);
|
||||
|
||||
var params = {
|
||||
objectType: 'item'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue