From 19e0505dc76e6cceea48c702d716956b9638eb81 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Sun, 12 Mar 2017 05:12:27 +0000 Subject: [PATCH] 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. --- src/librustdoc/html/render.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 44f71d8952985..c571bcb08e4b7 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -763,7 +763,7 @@ fn write_shared(cx: &Context, // going on). If they're in different crates then the crate defining // the trait will be interested in our implementation. if imp.def_id.krate == did.krate { continue } - write!(implementors, r#""{}","#, imp.impl_).unwrap(); + write!(implementors, "{},", as_json(&imp.impl_.to_string())).unwrap(); } implementors.push_str("];");