mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-19 16:20:43 +00:00
Add rel="noopener noreferrer" to external links
Background: https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerab ility-ever-96e328301f4c#.hduwdbjlb
This commit is contained in:
@@ -34,6 +34,7 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
|
||||
// Set up the link
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("target","_blank");
|
||||
link.setAttribute("rel","noopener noreferrer");
|
||||
if(Blob !== undefined) {
|
||||
var blob = new Blob([text], {type: "text/html"});
|
||||
link.setAttribute("href", URL.createObjectURL(blob));
|
||||
|
||||
Reference in New Issue
Block a user