rustdoc: HTML escape crate version
As `--crate-version` accepts arbitrary strings they need to be escaped.
This commit is contained in:
parent
3eeefc21f1
commit
3c97f8ad12
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