diff --git a/src/static/js/domline.js b/src/static/js/domline.js
index 100ce0919..7904029bd 100644
--- a/src/static/js/domline.js
+++ b/src/static/js/domline.js
@@ -198,7 +198,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
{
href = "http://"+href;
}
- extraOpenTags = extraOpenTags + '';
+ // Using rel="noreferrer" stops leaking the URL/location of the pad when clicking links in the document.
+ // Not all browsers understand this attribute, but it's part of the HTML5 standard.
+ // http://www.w3.org/TR/html5/links.html#link-type-noreferrer
+ extraOpenTags = extraOpenTags + '';
extraCloseTags = '' + extraCloseTags;
}
if (simpleTags)
diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js
index ef675dc75..855dd82b1 100644
--- a/src/static/js/pad_utils.js
+++ b/src/static/js/pad_utils.js
@@ -223,7 +223,10 @@ var padutils = {
var startIndex = urls[j][0];
var href = urls[j][1];
advanceTo(startIndex);
- pieces.push('');
+ // Using rel="noreferrer" stops leaking the URL/location of the pad when clicking links in the document.
+ // Not all browsers understand this attribute, but it's part of the HTML5 standard.
+ // http://www.w3.org/TR/html5/links.html#link-type-noreferrer
+ pieces.push('');
advanceTo(startIndex + href.length);
pieces.push('');
}