diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 150ad51c7bb..f68e82501e9 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -289,6 +289,7 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
// html for text rather than the raw text.
let mut id = s.clone();
let repl_sub = vec!["", "", "", "
",
+ "", "",
"<", ">", "&", "'", """];
for sub in repl_sub {
id = id.replace(sub, "");
@@ -326,8 +327,8 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
});
// Render the HTML
- let text = format!(r##"
baz
❤ #qux