diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-03-06 09:34:04 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-03-06 09:34:04 -0800 |
| commit | 9f6bcedb6767dafbb65d6536429eccea2c600103 (patch) | |
| tree | 16a8bd0eb391283e4550c9940e366c6e15954377 | |
| parent | fb80b384f4b6611ce4d880991a1026e93acdd6f7 (diff) | |
| download | rust-9f6bcedb6767dafbb65d6536429eccea2c600103.tar.gz rust-9f6bcedb6767dafbb65d6536429eccea2c600103.zip | |
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
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 3 |
1 files changed, 1 insertions, 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 std::vec; 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) }); } |
