From 0f1609237617502233ca8e438f03ddd08e3e4d1e Mon Sep 17 00:00:00 2001 From: Peter Vermeer Date: Thu, 8 Jun 2023 15:53:31 +0200 Subject: [PATCH] allow vnc:// as known url prefix --- lib/simditor.js | 2 +- src/buttons/link.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/simditor.js b/lib/simditor.js index 564ef062..b236c17f 100644 --- a/lib/simditor.js +++ b/lib/simditor.js @@ -4241,7 +4241,7 @@ LinkPopover = (function(superClass) { return; } val = _this.urlEl.val(); - if (!(/^(http|https|ftp|ftps|file)?:\/\/|^(mailto|tel)?:|^\//ig.test(val) || !val)) { + if (!(/^(http|https|ftp|ftps|file|vnc)?:\/\/|^(mailto|tel)?:|^\//ig.test(val) || !val)) { val = 'http://' + val; } _this.target.attr('href', val); diff --git a/src/buttons/link.coffee b/src/buttons/link.coffee index 79d143a0..fccf11b7 100644 --- a/src/buttons/link.coffee +++ b/src/buttons/link.coffee @@ -100,7 +100,7 @@ class LinkPopover extends Popover return if e.which == 13 val = @urlEl.val() - val = 'http://' + val unless /^(http|https|ftp|ftps|file)?:\/\/|^(mailto|tel)?:|^\//ig.test(val) or !val + val = 'http://' + val unless /^(http|https|ftp|ftps|file|vnc)?:\/\/|^(mailto|tel)?:|^\//ig.test(val) or !val @target.attr 'href', val @editor.inputManager.throttledValueChanged()