forked from SWISDATA/processintel
graphs.visualization: activity names with &, < or > break graph rendering and export #2
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: critical (one such character in an activity name stops the graph from rendering)
Where
app/graphs/visualization/directly_follows_graph.py:36,:121app/graphs/visualization/petri_net_graph.py:40app/graphs/visualization/bpmn_graph.py:82app/components/interactiveGraph/frontend/src/InteractiveGraph.tsx:89-97Problem
All node labels are built as Graphviz HTML-like labels by inserting the raw activity name:
Graphviz parses these labels as XML, so
&,<and>must be escaped (&,<,>). They are not. Real-world logs often contain names likeR&D,Check amount > 1000or<unknown>, and any one of them makes the whole graph fail to render.Verified with the local
dotbinary:Fuzzy miner cluster labels use the same pattern. Their content is generated today, but it is equally fragile.
Steps to reproduce
R&D review(orAmount > 1000)Expected behavior
The graph is rendered and exported, with the activity name shown as written.
Actual behavior
renderDotfails, the"end"event never fires, and the overlay "The Graph is being rendered…" stays forever. No error is shown.graphviz.render()raisesCalledProcessError, whichExportController.rundoes not catch. The user sees a Streamlit exception page.Related: #51 (root cause).
Fix
html.escape(title, quote=True)in one central helper inBaseGraph, used by every HTML-label builder..onerror(...)on the d3-graphviz instance or try/catch aroundrenderDot) and show the error instead of the endless spinner.ExportController, catchgraphviz.backend.CalledProcessError/ExecutableNotFoundand report it.from
issues/BUG-002-graphviz-html-labels-not-escaped.md(code analysis of commit6bcc646, 2026-10-03)->#25