Markdown plugin: add rel="noopener noreferrer" to external links (#4771)

optimising-macrocalls
ento 2020-11-08 02:47:44 -09:00 zatwierdzone przez GitHub
rodzic e72d90c227
commit e574cb4724
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -119,7 +119,8 @@ function convertNodes(remarkableTree, isStartOfInline) {
// External link
var attributes = {
class: { type: "string", value: "tc-tiddlylink-external" },
href: { type: "string", value: currentNode.href }
href: { type: "string", value: currentNode.href },
rel: { type: "string", value: "noopener noreferrer" }
};
if (pluginOpts.linkNewWindow) {
attributes.target = { type: "string", value: "_blank" };