From 0d902235cc12e033d168687e0af8a999481db935 Mon Sep 17 00:00:00 2001 From: Vadym Voitiuk Date: Sun, 2 Nov 2025 18:24:40 +0100 Subject: [PATCH] Fix: Import fails if document contains a mailto link #20 --- src/Importer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Importer.ts b/src/Importer.ts index 373893a..bd7ffbf 100644 --- a/src/Importer.ts +++ b/src/Importer.ts @@ -28,7 +28,7 @@ export class Importer { async process_A(anchor: HTMLElement) { const href = anchor.getAttribute('href'); - if (href && this.hostname.contains(new URL(href).hostname)) { + if (href && (new URL(href).protocol == 'https:') && this.hostname.contains(new URL(href).hostname)) { // try to remap link to relevant Obsidian note, if one exists const secret_path = href.split('.com/', 2).at(1).split('/').at(0); const title = anchor.innerText;