Opened 7 years ago
Closed 3 years ago
#1563 closed enhancement (duplicate)
add ability to add links by URI and edit existing link attachment URIs
| Reported by: | bdarcus | Owned by: | dstillman |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | interface | Version: | future |
| Keywords: | Cc: | fbennett |
Description (last modified by ajlyon)
There is no way to either add a new attachment link (apart from actually having the page loaded, in which case it will typically pick up redirect URIs instead, which is often not what I want), or to edit an existing one (which may be wrong as a consequence of the above (and related weirdness with cookies and such)).
In general, I think the entire UI around links needs work, but this is the most frustrating problem for me.
Cc'ing Frank to let him see about folding this into Multilingual for further testing.
Attachments (2)
Change History (10)
Changed 5 years ago by ajlyon
comment:1 Changed 5 years ago by ajlyon
- Cc fbennett added
- Description modified (diff)
comment:2 Changed 5 years ago by dstillman
- Resolution set to fixed
- Status changed from new to closed
In [9501]:
comment:3 Changed 5 years ago by ajlyon
- Resolution fixed deleted
- Status changed from closed to reopened
This still doesn't address the requests completely until we loosen the URI regex in attachments.js:417-422:
// Throw error on invalid URLs
var urlRe = /^https?:\/\/[^\s]*$/;
var matches = urlRe.exec(url);
if (!matches) {
throw ("Invalid URL '" + url + "' in Zotero.Attachments.linkFromURL()");
}
Reopening accordingly. Is there any reason we can't allow arbitrary protocols? Otherwise, we should develop a pretty large whitelist and include it now.
comment:4 Changed 5 years ago by ajlyon
comment:5 Changed 5 years ago by ajlyon
Attaching patch to allow evernote://, onenote://, x-devonthink-item://, and ftp://.
Changed 5 years ago by ajlyon
comment:6 Changed 5 years ago by ajlyon
Also noted:
- PersonalBrain (brain://4F836BB7-F56E-CC56-3B5A-571FFA2E9B03/AAA3C936-00E8-9CE5-28F5-66508A2DAC55)
- MyLife Organized (mlo://C:\DataBase\MyLife.ml?{0E855AA8-5404-486A-A186-18E4204D2612})
I don't know either of these programs, but I don't know whether there are any reasons we'd exclude even minor programs. We almost certainly don't want to allow data:, and probably not mailto:, but it seems we can be pretty lax here. Is there are reason not to?
comment:7 Changed 3 years ago by adamsmith
comment:8 Changed 3 years ago by dstillman
- Resolution set to duplicate
- Status changed from reopened to closed
Noted in the forums for Evernote integration: http://forums.zotero.org/discussion/18406
And earlier: http://forums.zotero.org/discussion/8188
I've written a small patch versus trunk (r9500) that addresses this by adding a new option of "Attach Link to URI...". This doesn't allow the user to specify a title, but that can be edited after the fact, and any other solution I know of would require writing a new XUL file, which I try to avoid doing.
Perhaps this papercut bug, in the parlance of Mozilla these days, could be closed?