Desktop: Fixes #8946: Whitelisted Joplin markdown links for copy pasting in WYSIWYG mode (#8972)

pull/9015/head
CptMeetKat 2023-10-05 21:49:25 +11:00 committed by GitHub
parent e70f31baea
commit 0320d9f479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -164,6 +164,7 @@ class HtmlUtils {
if (url.startsWith('https://') || if (url.startsWith('https://') ||
url.startsWith('http://') || url.startsWith('http://') ||
url.startsWith('mailto://') || url.startsWith('mailto://') ||
url.startsWith('joplin://') ||
// We also allow anchors but only with a specific set of a characters. // We also allow anchors but only with a specific set of a characters.
// Fixes https://github.com/laurent22/joplin/issues/8286 // Fixes https://github.com/laurent22/joplin/issues/8286
!!url.match(/^#[a-zA-Z0-9-]+$/)) return true; !!url.match(/^#[a-zA-Z0-9-]+$/)) return true;