Merge branch 'v7-fix-linkpicker-anchor-link-without-url' of https://github.com/kjac/Umbraco-CMS into kjac-v7-fix-linkpicker-anchor-link-without-url

This commit is contained in:
Shannon
2019-06-18 14:08:45 +10:00

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