about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmogh Shivaram <ashivaram264@gmail.com>2025-08-08 00:20:55 -0500
committerAmogh Shivaram <ashivaram264@gmail.com>2025-08-08 00:20:55 -0500
commit997c6a88216ac6a11bb864ab92fa4cf3da72f019 (patch)
tree77b42e0cff74fc548d867c9093bed5bb48b04147
parent6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd (diff)
downloadrust-997c6a88216ac6a11bb864ab92fa4cf3da72f019.tar.gz
rust-997c6a88216ac6a11bb864ab92fa4cf3da72f019.zip
Escape diff strings in graphviz
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/graphviz.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/graphviz.rs b/compiler/rustc_mir_dataflow/src/framework/graphviz.rs
index a7d5422a3d7..f86a15a8f92 100644
--- a/compiler/rustc_mir_dataflow/src/framework/graphviz.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/graphviz.rs
@@ -800,6 +800,7 @@ where
     let re = regex!("\t?\u{001f}([+-])");
 
     let raw_diff = format!("{:#?}", DebugDiffWithAdapter { new, old, ctxt });
+    let raw_diff = dot::escape_html(&raw_diff);
 
     // Replace newlines in the `Debug` output with `<br/>`
     let raw_diff = raw_diff.replace('\n', r#"<br align="left"/>"#);