Feed links are followed only when they are web addresses (#326)
An item's link and an enclosure's URL are the publisher's, stored as written, and the page put them in href and window.open through esc(), which escapes characters, not schemes: a javascript: or data: link survived as Open the original, View in a new tab (for a file not on disk), the Directory's item links and the v key. Show notes already lose those schemes to ammonia; these four sinks were the exception. webUrl() passes http(s) only, and each sink goes through it. A link that fails it shows no link, as an item with none does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -261,7 +261,7 @@ const KEYS: Record<string,()=>void>={
|
||||
// The toolbar's own buttons, so a key does exactly what the click does, and nothing while
|
||||
// they are disabled.
|
||||
o:()=>$<HTMLButtonElement>('#tbPlay').click(), m:()=>$<HTMLButtonElement>('#tbRead').click(), s:()=>$<HTMLButtonElement>('#tbFlag').click(),
|
||||
v:()=>{ const e=cur(); if(e&&e.link) window.open(e.link,'_blank','noopener'); },
|
||||
v:()=>{ const u=webUrl(cur()?.link); if(u) window.open(u,'_blank','noopener'); },
|
||||
A:()=>$('#content .fhead [data-a="read"], #content .fhead [data-a="readall"]')?.click(),
|
||||
r:async()=>{ await loadFeeds(true); if(S.feed){ renderFeed(); loadEntries(); } },
|
||||
'[':()=>matchMedia('(max-width:820px)').matches
|
||||
|
||||
Reference in New Issue
Block a user