Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

Commit 3c820df

Browse files
fix(security): escape single quotes in GraphStorytellerExporter (CWE-79)
The esc() method was missing single-quote escaping, allowing potential XSS via crafted node IDs containing single quotes in attribute contexts. Added ' escaping to match the complete HTML escaping used by InteractiveHtmlExporter.escHtml() and ExportUtils.escapeXml().
1 parent a02953f commit 3c820df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Gvisual/src/gvisual/GraphStorytellerExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,6 @@ private double computeStdDev(Collection<Integer> values) {
372372
private static String esc(String s) {
373373
if (s == null) return "";
374374
return s.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
375-
.replace("\"", "&quot;");
375+
.replace("\"", "&quot;").replace("'", "&#39;");
376376
}
377377
}

0 commit comments

Comments
 (0)