Skip to content

Commit 3e11a69

Browse files
Merge #1024
1024: Upgrade to ammonia 0.7.0 r=carols10cents You should probably rebuild all the READMEs after this.
2 parents 314f793 + 3ade9d4 commit 3e11a69

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Cargo.lock

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ serde = "1.0.0"
4949
clippy = { version = "=0.0.142", optional = true }
5050
chrono = "0.4.0"
5151
comrak = { version = "0.1.8", default-features = false }
52-
ammonia = "0.6.0"
52+
ammonia = "0.7.0"
5353
docopt = "0.8.1"
5454
itertools = "0.6.0"
5555

src/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'a> MarkdownRenderer<'a> {
6969
.cloned()
7070
.collect();
7171
let html_sanitizer = Ammonia {
72-
link_rel: Some("nofollow"),
72+
link_rel: Some("nofollow noopener noreferrer"),
7373
keep_cleaned_elements: true,
7474
tags: tags,
7575
tag_attributes: tag_attributes,
@@ -161,7 +161,7 @@ mod tests {
161161
let result = markdown_to_html(text).unwrap();
162162
assert_eq!(
163163
result,
164-
"<p>foo_readme\\n\\n<a href=\"https://crates.io/crates/cargo-registry\" rel=\"nofollow\">Crate page</a></p>\n"
164+
"<p>foo_readme\\n\\n<a href=\"https://crates.io/crates/cargo-registry\" rel=\"nofollow noopener noreferrer\">Crate page</a></p>\n"
165165
);
166166
}
167167
}

0 commit comments

Comments
 (0)