Add rel="noopener" to external links

Fixes #4764
This commit is contained in:
Francis Lachapelle
2019-06-10 13:19:46 -04:00
parent 3129e149df
commit 0e918a446a
7 changed files with 8 additions and 5 deletions

View File

@@ -521,6 +521,8 @@ _xmlCharsetForCharset (NSString *charset)
== NSNotFound
&& ![value hasPrefix: @"mailto:"]
&& ![value hasPrefix: @"#"]);
if (!skipAttribute)
[resultPart appendString: @" rel=\"noopener\""];
}
// Avoid: <div style="background:url('http://www.sogo.nu/fileadmin/sogo/logos/sogo.bts.png' ); width: 200px; height: 200px;" title="ssss">
else if ([name isEqualToString: @"style"])