Skip to content

Commit d57fed8

Browse files
Rollup merge of #46010 - lnicola:escape-root, r=GuillaumeGomez
rustdoc: Escape doc root URLs This fixes a small HTML injection issue.
2 parents b09af70 + cca6cf3 commit d57fed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ impl<'a> Item<'a> {
16831683
format!("{}-{}", self.item.source.loline, self.item.source.hiline)
16841684
};
16851685
Some(format!("{root}src/{krate}/{path}#{lines}",
1686-
root = root,
1686+
root = Escape(&root),
16871687
krate = krate,
16881688
path = path,
16891689
lines = lines))

0 commit comments

Comments
 (0)