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:
Jermolene
2016-05-05 11:49:40 +01:00
parent 8a08eee4bd
commit 3a3754aebb
17 changed files with 22 additions and 16 deletions
+1
View File
@@ -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));