diff --git a/documentation/FEATURES.md b/documentation/FEATURES.md index b8ef0db..e453aa1 100644 --- a/documentation/FEATURES.md +++ b/documentation/FEATURES.md @@ -59,6 +59,7 @@ - **Drag to link** - Drag notes or images into the editor to insert links - **Click to navigate** - Jump between notes seamlessly - **External links** - Open in new tabs automatically +- **URI protocols** - Supports `mailto:`, `tel:`, `ssh:`, `ftp:`, `slack:`, `discord:`, `teams:`, `zoom:`, `whatsapp:`, `telegram:`, `signal:`, `spotify:`, `steam:`, `magnet:`, and more ### Outline Panel - **Table of Contents** - View all headings (H1-H6) in sidebar diff --git a/frontend/app.js b/frontend/app.js index b71b9ec..7fced06 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -2580,7 +2580,9 @@ function noteApp() { if (!href) return; // Check if it's an external link or API path (media files, etc.) - if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//') || href.startsWith('mailto:') || href.startsWith('/api/')) { + // Safe external protocols: http, https, mailto, tel, ssh, ftp, sftp, and app deep links + const externalProtocols = ['http://', 'https://', '//', 'mailto:', 'tel:', 'ssh:', 'ftp:', 'sftp:', 'slack:', 'discord:', 'teams:', 'vscode:', 'zoom:', 'whatsapp:', 'telegram:', 'signal:', 'spotify:', 'steam:', 'magnet:', '/api/']; + if (externalProtocols.some(p => href.startsWith(p))) { return; // Let external links and API paths work normally }