mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Fix Incomplete string escaping or encoding
errors
This commit is contained in:
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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, '\\)');
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user