Skip to content

Commit 05824cd

Browse files
committed
rustdoc: fix HTML validation failure by escaping data-ty
1 parent 53e8b49 commit 05824cd

File tree

1 file changed

+2
-2
lines changed
  • src/librustdoc/html/render

1 file changed

+2
-2
lines changed

src/librustdoc/html/render/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1312,10 +1312,10 @@ pub(crate) fn notable_traits_button(ty: &clean::Type, cx: &mut Context<'_>) -> O
13121312
if has_notable_trait {
13131313
cx.types_with_notable_traits.insert(ty.clone());
13141314
Some(format!(
1315-
"<span class=\"notable-traits\" data-ty=\"{ty:#}\">\
1315+
"<span class=\"notable-traits\" data-ty=\"{ty}\">\
13161316
<span class=\"notable-traits-tooltip\">ⓘ</span>\
13171317
</span>",
1318-
ty = ty.print(cx),
1318+
ty = Escape(&format!("{:#}", ty.print(cx))),
13191319
))
13201320
} else {
13211321
None

0 commit comments

Comments
 (0)