Skip to content

Commit 19e0505

Browse files
committed
rustdoc: Fix string escaping in implementors js files
The generates HTML can contain quotes so we need to make sure they are escaped before inserting into the js files.
1 parent 5d0be0d commit 19e0505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ fn write_shared(cx: &Context,
763763
// going on). If they're in different crates then the crate defining
764764
// the trait will be interested in our implementation.
765765
if imp.def_id.krate == did.krate { continue }
766-
write!(implementors, r#""{}","#, imp.impl_).unwrap();
766+
write!(implementors, "{},", as_json(&imp.impl_.to_string())).unwrap();
767767
}
768768
implementors.push_str("];");
769769

0 commit comments

Comments
 (0)