Fix Incomplete string escaping or encoding

errors
This commit is contained in:
Arpit Jain
2025-05-05 12:15:41 +00:00
parent a566353030
commit 8af636c58d
7 changed files with 7 additions and 1 deletions

View File

@@ -446,6 +446,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\');
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
}

View File

@@ -48,6 +48,7 @@ export const drawEdge = function (elem, path, relation, conf, diagObj) {
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\');
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
}

View File

@@ -158,6 +158,7 @@ const getUrl = (useAbsolute: boolean): string => {
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\');
url = url.replaceAll(/\(/g, '\\(');
url = url.replaceAll(/\)/g, '\\)');
}

View File

@@ -457,6 +457,7 @@ const drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\'); // Escape backslashes
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
}

View File

@@ -455,6 +455,7 @@ const drawMessage = async function (diagram, msgModel, lineStartY: number, diagO
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\');
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
}

View File

@@ -450,6 +450,7 @@ export const drawEdge = function (elem, path, relation) {
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\\/g, '\\\\');
url = url.replace(/\(/g, '\\(');
url = url.replace(/\)/g, '\\)');
}

View File

@@ -637,7 +637,7 @@ export const insertEdge = function (elem, edge, clusterDb, diagramType, startNod
window.location.host +
window.location.pathname +
window.location.search;
url = url.replace(/\(/g, '\\(').replace(/\)/g, '\\)');
url = url.replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)');
}
log.info('arrowTypeStart', edge.arrowTypeStart);
log.info('arrowTypeEnd', edge.arrowTypeEnd);