Fixes #15512 to allow curly braces in anchors

This commit is contained in:
Markus Johansson
2023-12-28 15:19:27 +01:00
committed by Sebastiaan Janssen
parent cceabf88cd
commit 704aebed0c

View File

@@ -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);