From 704aebed0cb72e2b19836cfae114f6921f94005f Mon Sep 17 00:00:00 2001 From: Markus Johansson Date: Thu, 28 Dec 2023 15:19:27 +0100 Subject: [PATCH] Fixes #15512 to allow curly braces in anchors --- .../src/common/services/tinymce.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 7767e3c17b..7ca37d9c13 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -1184,7 +1184,7 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s if (currentTarget.url.indexOf("localLink:") > 0) { // if the current link has an anchor, it needs to be considered when getting the udi/id // if an anchor exists, reduce the substring max by its length plus two to offset the removed prefix and trailing curly brace - var linkId = currentTarget.url.substring(currentTarget.url.indexOf(":") + 1, currentTarget.url.lastIndexOf("}")); + var linkId = currentTarget.url.substring(currentTarget.url.indexOf(":") + 1, currentTarget.url.indexOf("}")); //we need to check if this is an INT or a UDI var parsedIntId = parseInt(linkId, 10);