Skip to content

Commit

Permalink
rustdoc: Fix string escaping in implementors js files
Browse files Browse the repository at this point in the history
The generates HTML can contain quotes so we need to make sure they are
escaped before inserting into the js files.
  • Loading branch information
ollie27 committed Mar 12, 2017
1 parent 5d0be0d commit 19e0505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Expand Up @@ -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("];");

Expand Down

0 comments on commit 19e0505

Please sign in to comment.