diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-11-16 10:05:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-16 10:05:07 +0100 |
| commit | d57fed893e63290c7ef58096cabc3aeea514014f (patch) | |
| tree | 5464cc928aed5b41d3404d620ac5e243bf45e4d1 | |
| parent | b09af7064edfa7aa19cdc474a7beace88f98e2a8 (diff) | |
| parent | cca6cf3febd0eb31f95325bc7a8815509a9d1c26 (diff) | |
| download | rust-d57fed893e63290c7ef58096cabc3aeea514014f.tar.gz rust-d57fed893e63290c7ef58096cabc3aeea514014f.zip | |
Rollup merge of #46010 - lnicola:escape-root, r=GuillaumeGomez
rustdoc: Escape doc root URLs This fixes a small HTML injection issue.
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 69eaf24289b..e848a8d3853 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1683,7 +1683,7 @@ impl<'a> Item<'a> { 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)) |
