rustdoc: fix HTML validation failure by escaping data-ty
This commit is contained in:
parent
53e8b490d8
commit
05824cd7b7
@ -1312,10 +1312,10 @@ pub(crate) fn notable_traits_button(ty: &clean::Type, cx: &mut Context<'_>) -> O
|
|||||||
if has_notable_trait {
|
if has_notable_trait {
|
||||||
cx.types_with_notable_traits.insert(ty.clone());
|
cx.types_with_notable_traits.insert(ty.clone());
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"<span class=\"notable-traits\" data-ty=\"{ty:#}\">\
|
"<span class=\"notable-traits\" data-ty=\"{ty}\">\
|
||||||
<span class=\"notable-traits-tooltip\">ⓘ</span>\
|
<span class=\"notable-traits-tooltip\">ⓘ</span>\
|
||||||
</span>",
|
</span>",
|
||||||
ty = ty.print(cx),
|
ty = Escape(&format!("{:#}", ty.print(cx))),
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user