Skip to content

Commit

Permalink
rustdoc: Don't escape contents of headers
Browse files Browse the repository at this point in the history
Turns out sundown has already escaped this content for us, so there's no need
for us to escape it again.

Closes #12736
  • Loading branch information
alexcrichton committed Mar 6, 2014
1 parent fb80b38 commit 9f6bced
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) });
}

Expand Down

5 comments on commit 9f6bced

@bors
Copy link
Contributor

@bors bors commented on 9f6bced Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at alexcrichton@9f6bced

@bors
Copy link
Contributor

@bors bors commented on 9f6bced Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/issue-12736 = 9f6bced into auto

@bors
Copy link
Contributor

@bors bors commented on 9f6bced Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/issue-12736 = 9f6bced merged ok, testing candidate = bd47f67

@bors
Copy link
Contributor

@bors bors commented on 9f6bced Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 9f6bced Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = bd47f67

Please sign in to comment.