mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
Rollup merge of #46010 - lnicola:escape-root, r=GuillaumeGomez
rustdoc: Escape doc root URLs This fixes a small HTML injection issue.
This commit is contained in:
@@ -1683,7 +1683,7 @@ fn src_href(&self) -> Option<String> {
|
||||
format!("{}-{}", self.item.source.loline, self.item.source.hiline)
|
||||
};
|
||||
Some(format!("{root}src/{krate}/{path}#{lines}",
|
||||
root = root,
|
||||
root = Escape(&root),
|
||||
krate = krate,
|
||||
path = path,
|
||||
lines = lines))
|
||||
|
||||
Reference in New Issue
Block a user