From 9f6bcedb6767dafbb65d6536429eccea2c600103 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 6 Mar 2014 09:34:04 -0800 Subject: [PATCH] rustdoc: Don't escape contents of headers Turns out sundown has already escaped this content for us, so there's no need for us to escape it again. Closes #12736 --- src/librustdoc/html/markdown.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 1c692677590..aca20331f0a 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -38,7 +38,6 @@ use collections::HashMap; use html::highlight; -use html::escape::Escape; /// A unit struct which has the `fmt::Show` trait implemented. When /// formatted, this struct will emit the HTML corresponding to the rendered @@ -198,7 +197,7 @@ pub fn render(w: &mut io::Writer, s: &str) -> fmt::Result { // Render the HTML let text = format!(r#"{}"#, - Escape(s.as_slice()), lvl = level, id = id); + s, lvl = level, id = id); text.with_c_str(|p| unsafe { bufputs(ob, p) }); } -- 2.44.0