Skip to content

Commit 2d73c48

Browse files
committed
Escape angle brackets
1 parent ca8f5b6 commit 2d73c48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/build_helper/src/metrics.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ pub fn format_build_steps(root: &BuildStep) -> String {
171171

172172
let mut output = String::new();
173173
for (level, step) in substeps {
174-
let label = format!("{}{}", ".".repeat(level as usize), step.r#type);
174+
let label = format!(
175+
"{}{}",
176+
".".repeat(level as usize),
177+
step.r#type.replace('<', "&lt;").replace('>', "&gt;")
178+
);
175179
writeln!(output, "{label:.<65}{:>8.2}s", step.duration.as_secs_f64()).unwrap();
176180
}
177181
output

0 commit comments

Comments
 (0)