Linkpicker should support anchor links without base URL

This commit is contained in:
Kenn Jacobsen
2019-06-07 09:03:35 +02:00
parent 4be6a48fb2
commit 580de6befe

View File

@@ -836,7 +836,7 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
}
}
if (!href) {
if (!href && !target.anchor) {
editor.execCommand('unlink');
return;
}
@@ -850,6 +850,10 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
return;
}
if (!href) {
href = "";
}
// Is email and not //user@domain.com and protocol (e.g. mailto:, sip:) is not specified
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf(':') === -1) {
// assume it's a mailto link