Skip to content

Commit

Permalink
Fixed html injection based on node content (#1849)
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtReMLapin authored Dec 2, 2024
1 parent 7184c22 commit bd7fe63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions studio/src/main/resources/static/js/studio-graph-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ function displaySelectedNode() {
for (let p in data.properties) {
let value = data.properties[p];
if (Array.isArray(value) || typeof value === "object") value = JSON.stringify(value);
table += "<tr><td>" + p + "</td><td>" + value + "</td>";
table += "<tr><td>" + escapeHtml(p) + "</td><td>" + escapeHtml(value) + "</td>";
}

$("#graphPropertiesTable").html(table);
Expand Down Expand Up @@ -831,7 +831,7 @@ function displaySelectedEdge() {
for (let p in data.properties) {
let value = data.properties[p];
if (Array.isArray(value) || typeof value === "object") value = JSON.stringify(value);
table += "<tr><td>" + p + "</td><td>" + value + "</td>";
table += "<tr><td>" + escapeHtml(p) + "</td><td>" + escapeHtml(value) + "</td>";
}
table += "</tbody>";

Expand Down

0 comments on commit bd7fe63

Please sign in to comment.