Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use noreferrer for window.open #1365

Merged
merged 1 commit into from Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/js/Node.js
Expand Up @@ -2581,7 +2581,7 @@ export class Node {
// if read-only, we use the regular click behavior of an anchor
if (isUrl(this.value)) {
event.preventDefault()
window.open(this.value, '_blank', 'noopener')
window.open(this.value, '_blank', 'noreferrer')
}
}
break
Expand Down Expand Up @@ -2749,7 +2749,7 @@ export class Node {
if (target === this.dom.value) {
if (!this.editable.value || event.ctrlKey) {
if (isUrl(this.value)) {
window.open(this.value, '_blank', 'noopener')
window.open(this.value, '_blank', 'noreferrer')
handled = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/textmode.js
Expand Up @@ -244,7 +244,7 @@ textmode.create = function (container, options = {}) {
// TODO: this anchor falls below the margin of the content,
// therefore the normal a.href does not work. We use a click event
// for now, but this should be fixed.
window.open(poweredBy.href, poweredBy.target, 'noopener')
window.open(poweredBy.href, poweredBy.target, 'noreferrer')
}
this.menu.appendChild(poweredBy)
}
Expand Down