We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 977415e commit 3ade9d4Copy full SHA for 3ade9d4
src/render.rs
@@ -69,7 +69,7 @@ impl<'a> MarkdownRenderer<'a> {
69
.cloned()
70
.collect();
71
let html_sanitizer = Ammonia {
72
- link_rel: Some("nofollow"),
+ link_rel: Some("nofollow noopener noreferrer"),
73
keep_cleaned_elements: true,
74
tags: tags,
75
tag_attributes: tag_attributes,
@@ -161,7 +161,7 @@ mod tests {
161
let result = markdown_to_html(text).unwrap();
162
assert_eq!(
163
result,
164
- "<p>foo_readme\\n\\n<a href=\"https://crates.io/crates/cargo-registry\" rel=\"nofollow\">Crate page</a></p>\n"
+ "<p>foo_readme\\n\\n<a href=\"https://crates.io/crates/cargo-registry\" rel=\"nofollow noopener noreferrer\">Crate page</a></p>\n"
165
);
166
}
167
0 commit comments