mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Markdown plugin: add rel="noopener noreferrer" to external links (#4771)
This commit is contained in:
parent
e72d90c227
commit
e574cb4724
@ -119,7 +119,8 @@ function convertNodes(remarkableTree, isStartOfInline) {
|
|||||||
// External link
|
// External link
|
||||||
var attributes = {
|
var attributes = {
|
||||||
class: { type: "string", value: "tc-tiddlylink-external" },
|
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) {
|
if (pluginOpts.linkNewWindow) {
|
||||||
attributes.target = { type: "string", value: "_blank" };
|
attributes.target = { type: "string", value: "_blank" };
|
||||||
|
Loading…
Reference in New Issue
Block a user