]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Don't escape contents of headers
authorAlex Crichton <alex@alexcrichton.com>
Thu, 6 Mar 2014 17:34:04 +0000 (09:34 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 6 Mar 2014 17:34:04 +0000 (09:34 -0800)
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

index 1c6926775908a86e1fde91a588b99b4b763b792b..aca20331f0aa3832c2e7e4cbbc6e114569bd96fa 100644 (file)
@@ -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#"<h{lvl} id="{id}">{}</h{lvl}>"#,
-                           Escape(s.as_slice()), lvl = level, id = id);
+                           s, lvl = level, id = id);
         text.with_c_str(|p| unsafe { bufputs(ob, p) });
     }