fix: add noreferrer to sanitized links for improved privacy consistency (#2628)

Enhance privacy by adding noreferrer to sanitized links
This commit is contained in:
Rin 2026-02-16 15:54:05 +07:00 committed by GitHub
parent d866c1b903
commit 0f220f50d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,7 +100,7 @@ const transformATag: Transformer = (tagName, attribs) => ({
tagName, tagName,
attribs: { attribs: {
...attribs, ...attribs,
rel: 'noopener', rel: 'noreferrer noopener',
target: '_blank', target: '_blank',
}, },
}); });
@ -112,7 +112,7 @@ const transformImgTag: Transformer = (tagName, attribs) => {
tagName: 'a', tagName: 'a',
attribs: { attribs: {
href: src, href: src,
rel: 'noopener', rel: 'noreferrer noopener',
target: '_blank', target: '_blank',
}, },
text: attribs.alt || src, text: attribs.alt || src,