about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-30 17:11:00 +0800
committerGitHub <noreply@github.com>2018-01-30 17:11:00 +0800
commit393a1994af93977fe1e35fb4ec308bc4e5d1a6dd (patch)
tree0201531f5d9118fc3e3c7edfafe56e8c9166c3f4 /src/test
parentb83fb0f2de8365bcc8e5c304cc3f1791e125ae5d (diff)
parentae98f4cac55af394c3e6477ed4c366f63b6626aa (diff)
downloadrust-393a1994af93977fe1e35fb4ec308bc4e5d1a6dd.tar.gz
rust-393a1994af93977fe1e35fb4ec308bc4e5d1a6dd.zip
Rollup merge of #47855 - ollie27:rustdoc_hoedown_link_title, r=QuietMisdreavus
rustdoc: Fix link title rendering with hoedown

The link title needs to be HTML escaped.

It was broken by #47046.

r? @QuietMisdreavus
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/link-title-escape.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/rustdoc/link-title-escape.rs b/src/test/rustdoc/link-title-escape.rs
new file mode 100644
index 00000000000..eb53c3c2cb5
--- /dev/null
+++ b/src/test/rustdoc/link-title-escape.rs
@@ -0,0 +1,19 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z unstable-options --disable-commonmark
+
+#![crate_name = "foo"]
+
+//! hello [foo]
+//!
+//! [foo]: url 'title & <stuff> & "things"'
+
+// @has 'foo/index.html' 'title &amp; &lt;stuff&gt; &amp; &quot;things&quot;'