Skip to content

Commit

Permalink
Merge branch 'v7-fix-linkpicker-anchor-link-without-url' of https://g…
Browse files Browse the repository at this point in the history
…ithub.com/kjac/Umbraco-CMS into kjac-v7-fix-linkpicker-anchor-link-without-url
  • Loading branch information
Shazwazza committed Jun 18, 2019
2 parents 99cabe5 + 580de6b commit 9f6da2c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ function tinyMceService($log, imageHelper, $http, $timeout, macroResource, macro
}
}

if (!href) {
if (!href && !target.anchor) {
editor.execCommand('unlink');
return;
}
Expand All @@ -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
Expand Down

0 comments on commit 9f6da2c

Please sign in to comment.