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.
This commit is contained in:
Oliver Middleton 2017-03-12 05:12:27 +00:00
parent 5d0be0d72a
commit 19e0505dc7
1 changed files with 1 additions and 1 deletions

View File

@ -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("];");