Skip to content

Commit

Permalink
fix: snapshots: normalize urls; utils.normalizeUrl: handle 'blob:' url
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Jan 17, 2025
1 parent 92d9e4f commit 9f3490a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/snapshots.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async function openWindow(snapshot: NormalizedSnapshot, winIndex: number): Promi

const tabInfo: ItemInfo = {
id: index++,
url: tab.url,
url: Utils.normalizeUrl(tab.url),
title: tab.title,
parentId: NOID,
folded: tab.folded,
Expand Down
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ export function normalizeUrl(url?: string, title?: string): string | undefined {
url.startsWith('data:') ||
url.startsWith('file:') ||
url.startsWith('jar:file:') ||
url.startsWith('blob:') ||
url.startsWith('about:')
) {
if (title) return URL_URL + '#' + encodeURIComponent(JSON.stringify([url, title]))
Expand Down

0 comments on commit 9f3490a

Please sign in to comment.