Skip to content

Commit

Permalink
rustdoc: fix HTML validation failure by escaping data-ty
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Nov 11, 2022
1 parent 53e8b49 commit 05824cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1312,10 +1312,10 @@ pub(crate) fn notable_traits_button(ty: &clean::Type, cx: &mut Context<'_>) -> O
if has_notable_trait {
cx.types_with_notable_traits.insert(ty.clone());
Some(format!(
"<span class=\"notable-traits\" data-ty=\"{ty:#}\">\
"<span class=\"notable-traits\" data-ty=\"{ty}\">\
<span class=\"notable-traits-tooltip\">ⓘ</span>\
</span>",
ty = ty.print(cx),
ty = Escape(&format!("{:#}", ty.print(cx))),
))
} else {
None
Expand Down

0 comments on commit 05824cd

Please sign in to comment.