Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomez
rustdoc: HTML escape crate version As `--crate-version` accepts arbitrary strings they need to be escaped. r? @GuillaumeGomez
This commit is contained in:
commit
22a03913f4
2 changed files with 9 additions and 2 deletions
|
@ -1313,7 +1313,8 @@ impl Context {
|
|||
<p>Version {}</p>\
|
||||
</div>\
|
||||
<a id='all-types' href='index.html'><p>Back to index</p></a>",
|
||||
crate_name, version
|
||||
crate_name,
|
||||
Escape(version),
|
||||
)
|
||||
} else {
|
||||
String::new()
|
||||
|
@ -3974,7 +3975,7 @@ fn print_sidebar(cx: &Context, it: &clean::Item, buffer: &mut Buffer) {
|
|||
"<div class='block version'>\
|
||||
<p>Version {}</p>\
|
||||
</div>",
|
||||
version
|
||||
Escape(version)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue